summaryrefslogtreecommitdiff
path: root/lib/librthread
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2017-05-29 21:19:31 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2017-05-29 21:19:31 +0000
commit553c36edf0e39407a49732ca3558eca4eacb5f63 (patch)
treef2051812704cec85134a6e121feb6d8855e74a4d /lib/librthread
parent61c1a63fc08db743c2459c9b23445bd7e308c21e (diff)
Enable futex-based mutex and condvar.
ok everybody
Diffstat (limited to 'lib/librthread')
-rw-r--r--lib/librthread/Makefile11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/librthread/Makefile b/lib/librthread/Makefile
index 7eed6fedfca..9328326cc61 100644
--- a/lib/librthread/Makefile
+++ b/lib/librthread/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.43 2016/06/01 04:34:18 tedu Exp $
+# $OpenBSD: Makefile,v 1.44 2017/05/29 21:19:30 mpi Exp $
LIB=pthread
LIBCSRCDIR= ${.CURDIR}/../libc
@@ -39,10 +39,17 @@ SRCS= rthread.c \
rthread_sig.c \
rthread_stack.c \
rthread_spin_lock.c \
- rthread_sync.c \
rthread_tls.c \
sched_prio.c
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
+CFLAGS+= -DFUTEX
+SRCS+= rthread_mutex.c \
+ rthread_cond.c
+.else
+SRCS+= rthread_sync.c
+.endif
+
OBJS+= _atomic_lock.o
SRCDIR= ${.CURDIR}/../libpthread