summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/_spinlock_stub.c
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2001-04-10 04:11:50 +0000
committerdeischen <deischen@FreeBSD.org>2001-04-10 04:11:50 +0000
commit3c4f2f3db28798206129ecb0f94e4aa3fa0dd106 (patch)
tree2b932f3e877b99e65db8b74c4098b7e9dbb1d7e8 /lib/libc/gen/_spinlock_stub.c
parent9afc57514e4beba89a3e84ca17a0f1875a536dd5 (diff)
downloadFreeBSD-src-3c4f2f3db28798206129ecb0f94e4aa3fa0dd106.zip
FreeBSD-src-3c4f2f3db28798206129ecb0f94e4aa3fa0dd106.tar.gz
To be consistent, use the __weak_reference macro from <sys/cdefs.h>
instead of #pragma weak to create weak definitions. This macro is improperly named, though, since a weak definition is not the same thing as a weak reference. Suggested by: bde
Diffstat (limited to 'lib/libc/gen/_spinlock_stub.c')
-rw-r--r--lib/libc/gen/_spinlock_stub.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/gen/_spinlock_stub.c b/lib/libc/gen/_spinlock_stub.c
index 071fc20..78c8dea 100644
--- a/lib/libc/gen/_spinlock_stub.c
+++ b/lib/libc/gen/_spinlock_stub.c
@@ -41,9 +41,10 @@
* 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
+__weak_reference(_atomic_lock_stub, _atomic_lock);
+__weak_reference(_spinlock_stub, _spinlock);
+__weak_reference(_spinlock_debug_stub, _spinlock_debug);
+
/*
* This function is a stub for the _atomic_lock function in libpthread.
OpenPOWER on IntegriCloud