summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormillert <millert@openbsd.org>2003-08-01 19:50:23 +0000
committermillert <millert@openbsd.org>2003-08-01 19:50:23 +0000
commit8f3f753f579262106607cfa2667bfef7fe7343df (patch)
tree3076379321fc6e3ba52f3ed597c87d2f002eae66
parentsync (diff)
downloadwireguard-openbsd-8f3f753f579262106607cfa2667bfef7fe7343df.tar.xz
wireguard-openbsd-8f3f753f579262106607cfa2667bfef7fe7343df.zip
Go back to using ITIMER_PROF for the non-profiled libpthread and use
ITIMER_VIRTUAL for the profiled version. Fixes problems when programs linked with libpthread try to use ITIMER_VIRTUAL (and have no way of knowing that this will cause conflicts with the threads lib). marc@ OK
-rw-r--r--lib/libpthread/Makefile3
-rw-r--r--lib/libpthread/uthread/pthread_private.h4
2 files changed, 3 insertions, 4 deletions
diff --git a/lib/libpthread/Makefile b/lib/libpthread/Makefile
index 7dce21262ac..087ff4eed35 100644
--- a/lib/libpthread/Makefile
+++ b/lib/libpthread/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.20 2003/06/10 05:00:51 marc Exp $
+# $OpenBSD: Makefile,v 1.21 2003/08/01 19:50:23 millert Exp $
#
# The pthread library is formed from the FreeBSD uthread sources of
@@ -10,7 +10,6 @@ LIBCSRCDIR= ${.CURDIR}/../libc
LIB= pthread
LINTFLAGS= -z
-CFLAGS+= -D_PTHREADS_COMPAT_SCHED
CFLAGS+= -DPTHREAD_KERNEL -D_POSIX_THREADS -D_THREAD_SAFE -Wall
CFLAGS+= -Wpointer-arith -Wwrite-strings -Wstrict-prototypes
CFLAGS+= -Wmissing-prototypes -Wsign-compare # -Werror
diff --git a/lib/libpthread/uthread/pthread_private.h b/lib/libpthread/uthread/pthread_private.h
index 57162bcf744..64d63c436ba 100644
--- a/lib/libpthread/uthread/pthread_private.h
+++ b/lib/libpthread/uthread/pthread_private.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pthread_private.h,v 1.47 2003/07/08 00:17:18 marc Exp $ */
+/* $OpenBSD: pthread_private.h,v 1.48 2003/08/01 19:50:23 millert Exp $ */
/*
* Copyright (c) 1995-1998 John Birrell <jb@cimlogic.com.au>.
* All rights reserved.
@@ -169,7 +169,7 @@
/*
* Define the signals to be used for scheduling.
*/
-#if defined(_PTHREADS_COMPAT_SCHED)
+#if defined(_PTHREADS_COMPAT_SCHED) || defined(PROF)
#define _ITIMER_SCHED_TIMER ITIMER_VIRTUAL
#define _SCHED_SIGNAL SIGVTALRM
#else