Allow atomic ops to be built as part of libpthread.

This commit is contained in:
ad 2008-09-29 08:43:00 +00:00
parent 9f3c3c08eb
commit ab62b04dc5
14 changed files with 42 additions and 42 deletions

View File

@ -1,13 +1,13 @@
# $NetBSD: Makefile.inc,v 1.3 2008/02/11 14:21:11 ad Exp $
# $NetBSD: Makefile.inc,v 1.4 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add.S atomic_and.S atomic_cas.S atomic_dec.S \
atomic_inc.S atomic_or.S atomic_swap.S membar_ops.S
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_cas.c

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.6 2008/04/29 20:57:50 scw Exp $
# $NetBSD: Makefile.inc,v 1.7 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@ -9,7 +9,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_testset.c
SRCS+= atomic_cas_up.S

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.4 2008/08/11 21:54:51 skrll Exp $
# $NetBSD: Makefile.inc,v 1.5 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@ -9,7 +9,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_testset.c
SRCS+= atomic_cas_up.S

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.5 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.6 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_64_cas.c atomic_add_64_nv_cas.c atomic_and_64_cas.c \
atomic_and_64_nv_cas.c atomic_dec_64_cas.c atomic_dec_64_nv_cas.c \
@ -9,7 +9,7 @@ SRCS+= atomic_add_64_cas.c atomic_add_64_nv_cas.c atomic_and_64_cas.c \
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_cas.c

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.1 2008/03/20 07:10:31 kochi Exp $
# $NetBSD: Makefile.inc,v 1.2 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c \
atomic_add_64_cas.c atomic_add_64_nv_cas.c \
@ -13,7 +13,7 @@ SRCS+= atomic.S
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS += atomic_init_cas.c

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.7 2008/04/29 20:57:50 scw Exp $
# $NetBSD: Makefile.inc,v 1.8 2008/09/29 08:43:00 ad Exp $
#
# Note: The atomic operations here in these assembly files are atomic
@ -9,7 +9,7 @@
# others are merely single-instruction).
#
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
.if ${MACHINE_ARCH} != "m68000"
SRCS+= atomic_add.S atomic_and.S atomic_cas.S atomic_dec.S \
@ -25,7 +25,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
.endif
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
.if ${MACHINE_ARCH} != "m68000"
SRCS+= atomic_init_cas.c

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.7 2008/04/30 00:17:34 ad Exp $
# $NetBSD: Makefile.inc,v 1.8 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@ -13,7 +13,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= membar_ops_nop.c atomic_init_testset.c atomic_cas_up.S
CPPFLAGS+= -D__HAVE_ASM_ATOMIC_CAS_UP

View File

@ -1,13 +1,13 @@
# $NetBSD: Makefile.inc,v 1.4 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.5 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add.S atomic_and.S atomic_cas.S atomic_dec.S \
atomic_inc.S atomic_or.S atomic_swap.S membar_ops.S
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_cas.c

View File

@ -1,13 +1,13 @@
# $NetBSD: Makefile.inc,v 1.4 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.5 2008/09/29 08:43:00 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add.S atomic_and.S atomic_cas.S atomic_dec.S \
atomic_inc.S atomic_or.S atomic_swap.S membar_ops.S
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_cas.c

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.3 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.4 2008/09/29 08:43:01 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@ -9,7 +9,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_testset.c

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile.inc,v 1.9 2008/03/07 02:18:34 ad Exp $
# $NetBSD: Makefile.inc,v 1.10 2008/09/29 08:43:01 ad Exp $
.include <bsd.own.mk>
@ -14,7 +14,7 @@ SPARC64DIR= ${.PARSEDIR}/../../sparc64/atomic
. if defined(LIB)
. if (${LIB} == "kern" || ${LIB} == "c")
. if (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
atomic_inc_32_cas.c atomic_inc_32_nv_cas.c atomic_or_32_cas.c \
@ -25,7 +25,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
SRCS+= atomic_cas.S
. endif
. if (${LIB} == "c")
. if (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_testset.c
. endif

View File

@ -1,13 +1,13 @@
# $NetBSD: Makefile.inc,v 1.4 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.5 2008/09/29 08:43:01 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add.S atomic_and.S atomic_cas.S atomic_dec.S \
atomic_inc.S atomic_or.S atomic_swap.S membar_ops.S
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_cas.c

View File

@ -1,6 +1,6 @@
# $NetBSD: Makefile.inc,v 1.3 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.4 2008/09/29 08:43:01 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
atomic_and_32_nv_cas.c atomic_dec_32_cas.c atomic_dec_32_nv_cas.c \
@ -9,7 +9,7 @@ SRCS+= atomic_add_32_cas.c atomic_add_32_nv_cas.c atomic_and_32_cas.c \
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_testset.c

View File

@ -1,12 +1,12 @@
# $NetBSD: Makefile.inc,v 1.4 2008/02/11 14:21:12 ad Exp $
# $NetBSD: Makefile.inc,v 1.5 2008/09/29 08:43:01 ad Exp $
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c")
.if defined(LIB) && (${LIB} == "kern" || ${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic.S
.endif
.if defined(LIB) && (${LIB} == "c")
.if defined(LIB) && (${LIB} == "c" || ${LIB} == "pthread")
SRCS+= atomic_init_cas.c