summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-02-06 03:13:46 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-02-06 03:13:46 +0000
commit67496f3afccf37a39f6ebcb85b59fbdbf625d0b7 (patch)
tree24836723f9238e5bf59f7b908cc53aa4651abc26
parent44bb1ffc34bd1128641e426dcd30f19c7d0a4835 (diff)
Instead of opting in to futexes on archs with atomics opt out on archs
without atomics, a smaller list. ok mpi@ visa@
-rw-r--r--lib/libc/thread/Makefile.inc13
-rw-r--r--lib/librthread/Makefile17
2 files changed, 12 insertions, 18 deletions
diff --git a/lib/libc/thread/Makefile.inc b/lib/libc/thread/Makefile.inc
index d94de6ee9ff..bc9edd58c5e 100644
--- a/lib/libc/thread/Makefile.inc
+++ b/lib/libc/thread/Makefile.inc
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.inc,v 1.18 2018/10/21 17:07:24 visa Exp $
+# $OpenBSD: Makefile.inc,v 1.19 2020/02/06 03:13:45 jsg Exp $
.PATH: ${LIBCSRCDIR}/thread
@@ -19,16 +19,13 @@ notyet= rthread_condattr_clock.c \
spinlock.c \
spinlocktry.c
-.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"
+.if ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "m88k" || \
+ ${MACHINE_ARCH} == "sh"
+SRCS+= rthread_sync.c
+.else
CFLAGS+= -DFUTEX
SRCS+= rthread_mutex.c \
rthread_cond.c
-.else
-SRCS+= rthread_sync.c
.endif
.if defined(NOPIC)
diff --git a/lib/librthread/Makefile b/lib/librthread/Makefile
index b455374c141..67a2678574d 100644
--- a/lib/librthread/Makefile
+++ b/lib/librthread/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.55 2019/02/13 13:22:14 mpi Exp $
+# $OpenBSD: Makefile,v 1.56 2020/02/06 03:13:45 jsg Exp $
LIB=pthread
LIBCSRCDIR= ${.CURDIR}/../libc
@@ -33,18 +33,15 @@ SRCS= rthread.c \
rthread_spin_lock.c \
sched_prio.c
-# Architectures that implement atomics
-.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"
+# Architectures without atomics
+.if ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "m88k" || \
+ ${MACHINE_ARCH} == "sh"
+SRCS+= rthread_sem_compat.c \
+ rthread_rwlock_compat.c
+.else
CFLAGS+= -DFUTEX
SRCS+= rthread_sem.c \
rthread_rwlock.c
-.else
-SRCS+= rthread_sem_compat.c \
- rthread_rwlock_compat.c
.endif
SRCDIR= ${.CURDIR}/../libpthread