1
0
mirror of https://github.com/openbsd/src.git synced 2026-04-27 15:46:02 +00:00

Instead of opting in to futexes on archs with atomics opt out on archs

without atomics, a smaller list.

ok mpi@ visa@
This commit is contained in:
jsg
2020-02-06 03:13:45 +00:00
parent ca82ddf5a8
commit 2ee00db36b
2 changed files with 12 additions and 18 deletions

View File

@@ -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)

View File

@@ -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