summaryrefslogtreecommitdiffstats
path: root/lib/libc/thread
diff options
context:
space:
mode:
authormarc <marc@openbsd.org>2004-06-07 21:11:23 +0000
committermarc <marc@openbsd.org>2004-06-07 21:11:23 +0000
commitf91de67f292fa8f5ed29aa37e5f5b87d8645664d (patch)
treedab54fdaea4206ab36fc68dc883c9be239ea81d6 /lib/libc/thread
parentCorrectly handle an unaligned long long parameter on stack in varargs functions; (diff)
downloadwireguard-openbsd-f91de67f292fa8f5ed29aa37e5f5b87d8645664d.tar.xz
wireguard-openbsd-f91de67f292fa8f5ed29aa37e5f5b87d8645664d.zip
major bump to libc and libpthread to break the dependency of a
particular implementation of libpthread for libc. libc no longer needs pthread.h to compile. OK millert@, brad@, tedu@
Diffstat (limited to 'lib/libc/thread')
-rw-r--r--lib/libc/thread/Makefile.inc4
-rw-r--r--lib/libc/thread/thread_fd.c9
-rw-r--r--lib/libc/thread/unithread_malloc_lock.c5
-rw-r--r--lib/libc/thread/unithread_storage.c40
-rw-r--r--lib/libc/thread/unithread_tag.c32
5 files changed, 39 insertions, 51 deletions
diff --git a/lib/libc/thread/Makefile.inc b/lib/libc/thread/Makefile.inc
index 356bf1a3cc9..9d323879900 100644
--- a/lib/libc/thread/Makefile.inc
+++ b/lib/libc/thread/Makefile.inc
@@ -1,6 +1,6 @@
-# $OpenBSD: Makefile.inc,v 1.5 2002/11/05 22:19:55 marc Exp $
+# $OpenBSD: Makefile.inc,v 1.6 2004/06/07 21:11:23 marc Exp $
.PATH: ${LIBCSRCDIR}/thread
-SRCS+= thread_fd.c unithread_storage.c unithread_malloc_lock.c
+SRCS+= thread_fd.c unithread_malloc_lock.c unithread_tag.c
diff --git a/lib/libc/thread/thread_fd.c b/lib/libc/thread/thread_fd.c
index f2a9ae2290b..9f10fedf837 100644
--- a/lib/libc/thread/thread_fd.c
+++ b/lib/libc/thread/thread_fd.c
@@ -1,7 +1,6 @@
-/* $OpenBSD: thread_fd.c,v 1.7 2002/11/05 22:19:55 marc Exp $ */
+/* $OpenBSD: thread_fd.c,v 1.8 2004/06/07 21:11:23 marc Exp $ */
#include <sys/time.h>
-#include <pthread.h>
#include "thread_private.h"
WEAK_PROTOTYPE(_thread_fd_lock);
@@ -11,15 +10,13 @@ WEAK_ALIAS(_thread_fd_lock);
WEAK_ALIAS(_thread_fd_unlock);
int
-WEAK_NAME(_thread_fd_lock)(int fd, int lock_type, struct timespec *timeout,
- const char *fname, int lineno)
+WEAK_NAME(_thread_fd_lock)(int fd, int lock_type, struct timespec *timeout)
{
return 0;
}
void
-WEAK_NAME(_thread_fd_unlock)(int fd, int lock_type, const char *fname,
- int lineno)
+WEAK_NAME(_thread_fd_unlock)(int fd, int lock_type)
{
}
diff --git a/lib/libc/thread/unithread_malloc_lock.c b/lib/libc/thread/unithread_malloc_lock.c
index 74855be7821..2c195a9a95c 100644
--- a/lib/libc/thread/unithread_malloc_lock.c
+++ b/lib/libc/thread/unithread_malloc_lock.c
@@ -1,7 +1,6 @@
-/* $OpenBSD: unithread_malloc_lock.c,v 1.4 2002/11/05 22:19:55 marc Exp $ */
+/* $OpenBSD: unithread_malloc_lock.c,v 1.5 2004/06/07 21:11:23 marc Exp $ */
-#include <sys/cdefs.h>
-#include <pthread.h>
+#include <sys/time.h>
#include "thread_private.h"
WEAK_PROTOTYPE(_thread_malloc_lock);
diff --git a/lib/libc/thread/unithread_storage.c b/lib/libc/thread/unithread_storage.c
deleted file mode 100644
index 456082a8a2b..00000000000
--- a/lib/libc/thread/unithread_storage.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/* $OpenBSD: unithread_storage.c,v 1.1 2000/01/06 15:07:06 d Exp $ */
-/*
- *
- */
-/* unthreaded storage allocation helper functions */
-
-#include <sys/cdefs.h>
-#include <pthread.h>
-#include "thread_private.h"
-
-WEAK_PROTOTYPE(_libc_private_storage_lock);
-WEAK_PROTOTYPE(_libc_private_storage_unlock);
-WEAK_PROTOTYPE(_libc_private_storage);
-
-WEAK_ALIAS(_libc_private_storage_lock);
-WEAK_ALIAS(_libc_private_storage_unlock);
-WEAK_ALIAS(_libc_private_storage);
-
-void
-WEAK_NAME(_libc_private_storage_lock)(mutex)
- pthread_mutex_t *mutex;
-{
-}
-
-void
-WEAK_NAME(_libc_private_storage_unlock)(mutex)
- pthread_mutex_t *mutex;
-{
-}
-
-void *
-WEAK_NAME(_libc_private_storage)(key, init, initsz, error)
- volatile struct _thread_private_key_struct * key;
- void *init;
- size_t initsz;
- void *error;
-{
-
- return init;
-}
diff --git a/lib/libc/thread/unithread_tag.c b/lib/libc/thread/unithread_tag.c
new file mode 100644
index 00000000000..c7ac928b994
--- /dev/null
+++ b/lib/libc/thread/unithread_tag.c
@@ -0,0 +1,32 @@
+/* $OpenBSD: unithread_tag.c,v 1.1 2004/06/07 21:11:23 marc Exp $ */
+
+/* PUBLIC DOMAIN: No Rights Reserved. Marco S Hyman <marc@snafu.org> */
+
+#include <sys/time.h>
+#include "thread_private.h"
+
+WEAK_PROTOTYPE(_thread_tag_lock);
+WEAK_PROTOTYPE(_thread_tag_unlock);
+WEAK_PROTOTYPE(_thread_tag_storage);
+
+WEAK_ALIAS(_thread_tag_lock);
+WEAK_ALIAS(_thread_tag_unlock);
+WEAK_ALIAS(_thread_tag_storage);
+
+void
+WEAK_NAME(_thread_tag_lock)(void **tag)
+{
+ return;
+}
+
+void
+WEAK_NAME(_thread_tag_unlock)(void **tag)
+{
+ return;
+}
+
+void *
+WEAK_NAME(_thread_tag_storage)(void **tag, void *init, size_t initsz, void *err)
+{
+ return init;
+}