summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread
diff options
context:
space:
mode:
authorMarco S Hyman <marc@cvs.openbsd.org>2002-11-03 20:36:44 +0000
committerMarco S Hyman <marc@cvs.openbsd.org>2002-11-03 20:36:44 +0000
commit664e44eac173bd00d9757c4d15084393436fcbdc (patch)
treed0df53493c5ae4d4dceb1c350e7bfa2b9d4770a8 /lib/libpthread/thread
parenta7bb9a3fe7041afd8e1153c8c5b97c0952ec0e2c (diff)
libc changes for thread safety. Tested on:
alpha (millert@), i386 (marc@), m68k (millert@ and miod@), powerpc (drahn@ and dhartmei@), sparc (millert@ and marc@), sparc64 (marc@), and vax (millert@ and miod@). Thanks to millert@, miod@, and mickey@ for fixes along the way.
Diffstat (limited to 'lib/libpthread/thread')
-rw-r--r--lib/libpthread/thread/Makefile.inc4
-rw-r--r--lib/libpthread/thread/thread_malloc_lock.c10
-rw-r--r--lib/libpthread/thread/thread_storage.c6
3 files changed, 15 insertions, 5 deletions
diff --git a/lib/libpthread/thread/Makefile.inc b/lib/libpthread/thread/Makefile.inc
index 919300d08ae..a235b563ae8 100644
--- a/lib/libpthread/thread/Makefile.inc
+++ b/lib/libpthread/thread/Makefile.inc
@@ -1,5 +1,5 @@
-# $OpenBSD: Makefile.inc,v 1.1 2000/01/06 07:25:15 d Exp $
+# $OpenBSD: Makefile.inc,v 1.2 2002/11/03 20:36:43 marc Exp $
.PATH: ${LIBC_RSRCDIR}/thread
-SRCS+= thread_storage.c
+SRCS+= thread_storage.c thread_malloc_lock.c
diff --git a/lib/libpthread/thread/thread_malloc_lock.c b/lib/libpthread/thread/thread_malloc_lock.c
index 68f899983cb..229973d7e89 100644
--- a/lib/libpthread/thread/thread_malloc_lock.c
+++ b/lib/libpthread/thread/thread_malloc_lock.c
@@ -1,7 +1,8 @@
+/* $OpenBSD: thread_malloc_lock.c,v 1.2 2002/11/03 20:36:43 marc Exp $ */
+/* Public Domain <marc@snafu.org> */
+
#include <pthread.h>
#include "pthread_private.h"
-#include "thread_private.h"
-#include "spinlock.h"
static spinlock_t malloc_lock = _SPINLOCK_INITIALIZER;
@@ -16,3 +17,8 @@ _thread_malloc_unlock()
{
_SPINUNLOCK(&malloc_lock);
}
+
+void
+_thread_malloc_init()
+{
+}
diff --git a/lib/libpthread/thread/thread_storage.c b/lib/libpthread/thread/thread_storage.c
index fa8357c85ec..5872003a09f 100644
--- a/lib/libpthread/thread/thread_storage.c
+++ b/lib/libpthread/thread/thread_storage.c
@@ -1,5 +1,9 @@
+/* $OpenBSD: thread_storage.c,v 1.4 2002/11/03 20:36:43 marc Exp $ */
+/* Public Domain */
-/* libpthread's stronger functions */
+/*
+ * libpthread's stronger functions
+ */
#include <stdlib.h>
#include <pthread.h>