summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-09-03 17:56:26 +0000
committerdeischen <deischen@FreeBSD.org>2003-09-03 17:56:26 +0000
commit919bc52171f32bfe264b987934e1055b6901ac6d (patch)
tree4224af62a2f45f6a320c58acdd7f40a2692ca686 /lib/libpthread/thread
parent43632098e791da21a8b261c5b05b55cba97ae911 (diff)
downloadFreeBSD-src-919bc52171f32bfe264b987934e1055b6901ac6d.zip
FreeBSD-src-919bc52171f32bfe264b987934e1055b6901ac6d.tar.gz
Don't assume sizeof(long) = sizeof(int) on x86; use int
instead of long types for low-level locks. Add prototypes for some internal libc functions that are wrapped by the library as cancellation points. Add memory barriers to alpha atomic swap functions (submitted by davidxu). Requested by: bde
Diffstat (limited to 'lib/libpthread/thread')
-rw-r--r--lib/libpthread/thread/thr_creat.c2
-rw-r--r--lib/libpthread/thread/thr_pause.c2
-rw-r--r--lib/libpthread/thread/thr_sleep.c2
-rw-r--r--lib/libpthread/thread/thr_system.c2
-rw-r--r--lib/libpthread/thread/thr_tcdrain.c2
-rw-r--r--lib/libpthread/thread/thr_wait.c2
-rw-r--r--lib/libpthread/thread/thr_wait4.c3
-rw-r--r--lib/libpthread/thread/thr_waitpid.c2
8 files changed, 17 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_creat.c b/lib/libpthread/thread/thr_creat.c
index bba8ec3..478e037 100644
--- a/lib/libpthread/thread/thr_creat.c
+++ b/lib/libpthread/thread/thr_creat.c
@@ -33,6 +33,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern int __creat(const char *, mode_t);
+
__weak_reference(___creat, creat);
int
diff --git a/lib/libpthread/thread/thr_pause.c b/lib/libpthread/thread/thr_pause.c
index b6bcc51..aa97c77 100644
--- a/lib/libpthread/thread/thr_pause.c
+++ b/lib/libpthread/thread/thr_pause.c
@@ -33,6 +33,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern int __pause(void);
+
__weak_reference(_pause, pause);
int
diff --git a/lib/libpthread/thread/thr_sleep.c b/lib/libpthread/thread/thr_sleep.c
index 0f02db7..b494e5b 100644
--- a/lib/libpthread/thread/thr_sleep.c
+++ b/lib/libpthread/thread/thr_sleep.c
@@ -33,6 +33,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern unsigned int __sleep(unsigned int);
+
__weak_reference(_sleep, sleep);
unsigned int
diff --git a/lib/libpthread/thread/thr_system.c b/lib/libpthread/thread/thr_system.c
index 28976d3..ae26c9c 100644
--- a/lib/libpthread/thread/thr_system.c
+++ b/lib/libpthread/thread/thr_system.c
@@ -33,6 +33,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern int __system(const char *);
+
__weak_reference(_system, system);
int
diff --git a/lib/libpthread/thread/thr_tcdrain.c b/lib/libpthread/thread/thr_tcdrain.c
index 6a2002b..86af9c2 100644
--- a/lib/libpthread/thread/thr_tcdrain.c
+++ b/lib/libpthread/thread/thr_tcdrain.c
@@ -33,6 +33,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern int __tcdrain(int);
+
__weak_reference(_tcdrain, tcdrain);
int
diff --git a/lib/libpthread/thread/thr_wait.c b/lib/libpthread/thread/thr_wait.c
index 98f2c8d..b0a3af4 100644
--- a/lib/libpthread/thread/thr_wait.c
+++ b/lib/libpthread/thread/thr_wait.c
@@ -32,6 +32,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern int __wait(int *);
+
__weak_reference(_wait, wait);
pid_t
diff --git a/lib/libpthread/thread/thr_wait4.c b/lib/libpthread/thread/thr_wait4.c
index 9f23584..07ff79d 100644
--- a/lib/libpthread/thread/thr_wait4.c
+++ b/lib/libpthread/thread/thr_wait4.c
@@ -33,9 +33,12 @@
*/
#include <sys/types.h>
+#include "namespace.h"
#include <errno.h>
#include <sys/wait.h>
#include <pthread.h>
+#include "un-namespace.h"
+
#include "thr_private.h"
__weak_reference(__wait4, wait4);
diff --git a/lib/libpthread/thread/thr_waitpid.c b/lib/libpthread/thread/thr_waitpid.c
index 8ee3ce1..e09bbd5 100644
--- a/lib/libpthread/thread/thr_waitpid.c
+++ b/lib/libpthread/thread/thr_waitpid.c
@@ -34,6 +34,8 @@
#include <pthread.h>
#include "thr_private.h"
+extern int __waitpid(pid_t, int *, int);
+
__weak_reference(_waitpid, waitpid);
pid_t
OpenPOWER on IntegriCloud