summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2018-10-21 17:07:24 +0000
committervisa <visa@openbsd.org>2018-10-21 17:07:24 +0000
commit2b819b9469dd1b5852b324ae10fcffed47a792b5 (patch)
tree5293dffb8a8dad753eca0dfc6fd018e9c5366981 /lib
parentAdd flock insertion tests covering all possible forms of byte range overlap. (diff)
downloadwireguard-openbsd-2b819b9469dd1b5852b324ae10fcffed47a792b5.tar.xz
wireguard-openbsd-2b819b9469dd1b5852b324ae10fcffed47a792b5.zip
Switch alpha to futex(2) based condvars, mutexes and semaphores.
From Brad, tested by Miod, OK kettenis@
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/thread/Makefile.inc11
-rw-r--r--lib/librthread/Makefile11
2 files changed, 12 insertions, 10 deletions
diff --git a/lib/libc/thread/Makefile.inc b/lib/libc/thread/Makefile.inc
index bd53875baa6..d94de6ee9ff 100644
--- a/lib/libc/thread/Makefile.inc
+++ b/lib/libc/thread/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.17 2018/10/15 13:03:11 visa Exp $
+# $OpenBSD: Makefile.inc,v 1.18 2018/10/21 17:07:24 visa Exp $
.PATH: ${LIBCSRCDIR}/thread
@@ -19,10 +19,11 @@ notyet= rthread_condattr_clock.c \
spinlock.c \
spinlocktry.c
-.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
- ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" || \
- ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
+.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "alpha" || \
+ ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm" || \
+ ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "mips64" || \
+ ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE_ARCH} == "sparc64"
CFLAGS+= -DFUTEX
SRCS+= rthread_mutex.c \
rthread_cond.c
diff --git a/lib/librthread/Makefile b/lib/librthread/Makefile
index 4f2474f0042..b848dada3a6 100644
--- a/lib/librthread/Makefile
+++ b/lib/librthread/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.52 2018/10/15 13:03:11 visa Exp $
+# $OpenBSD: Makefile,v 1.53 2018/10/21 17:07:24 visa Exp $
LIB=pthread
LIBCSRCDIR= ${.CURDIR}/../libc
@@ -36,10 +36,11 @@ SRCS= rthread.c \
sched_prio.c
# Architectures that implement atomics
-.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "amd64" || \
- ${MACHINE_ARCH} == "arm" || ${MACHINE_ARCH} == "i386" || \
- ${MACHINE_ARCH} == "mips64" || ${MACHINE_ARCH} == "mips64el" || \
- ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "sparc64"
+.if ${MACHINE_ARCH} == "aarch64" || ${MACHINE_ARCH} == "alpha" || \
+ ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm" || \
+ ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "mips64" || \
+ ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "powerpc" || \
+ ${MACHINE_ARCH} == "sparc64"
SRCS+= rthread_sem.c
.else
SRCS+= rthread_sem_compat.c