diff options
Diffstat (limited to 'lib/libc/gen/_spinlock_stub.c')
-rw-r--r-- | lib/libc/gen/_spinlock_stub.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/libc/gen/_spinlock_stub.c b/lib/libc/gen/_spinlock_stub.c index e3a800d..071fc20 100644 --- a/lib/libc/gen/_spinlock_stub.c +++ b/lib/libc/gen/_spinlock_stub.c @@ -35,18 +35,27 @@ #include <stdio.h> -/* Don't build these stubs into libc_r: */ -#ifndef _THREAD_SAFE #include "spinlock.h" /* - * Declare weak references in case the application is not linked + * Declare weak definitions in case the application is not linked * with libpthread. */ +#pragma weak _atomic_lock=_atomic_lock_stub #pragma weak _spinlock=_spinlock_stub #pragma weak _spinlock_debug=_spinlock_debug_stub /* + * This function is a stub for the _atomic_lock function in libpthread. + */ +long +_atomic_lock_stub(volatile long *lck) +{ + return (0L); +} + + +/* * This function is a stub for the spinlock function in libpthread. */ void @@ -61,4 +70,3 @@ void _spinlock_debug_stub(spinlock_t *lck, char *fname, int lineno) { } -#endif |