mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-08-03 00:10:31 +00:00
Use *NSYNC for POSIX threads locking APIs
Condition variables, barriers, and r/w locks now work very well.
This commit is contained in:
parent
3de35e196c
commit
b5cb71ab84
197 changed files with 3734 additions and 3817 deletions
|
@ -7,20 +7,14 @@ LIBC_THREAD_ARTIFACTS += LIBC_THREAD_A
|
|||
LIBC_THREAD = $(LIBC_THREAD_A_DEPS) $(LIBC_THREAD_A)
|
||||
LIBC_THREAD_A = o/$(MODE)/libc/thread/thread.a
|
||||
LIBC_THREAD_A_FILES := $(wildcard libc/thread/*)
|
||||
LIBC_THREAD_A_SRCS_S = $(filter %.S,$(LIBC_THREAD_A_FILES))
|
||||
LIBC_THREAD_A_HDRS = $(filter %.h,$(LIBC_THREAD_A_FILES))
|
||||
LIBC_THREAD_A_SRCS_C = $(filter %.c,$(LIBC_THREAD_A_FILES))
|
||||
LIBC_THREAD_A_SRCS_S = $(filter %.S,$(LIBC_THREAD_A_FILES))
|
||||
|
||||
LIBC_THREAD_A_SRCS = \
|
||||
$(LIBC_THREAD_A_SRCS_S) \
|
||||
$(LIBC_THREAD_A_SRCS_C)
|
||||
|
||||
LIBC_THREAD_A_HDRS = \
|
||||
libc/thread/spawn.h \
|
||||
libc/thread/thread.h \
|
||||
libc/thread/thread2.h \
|
||||
libc/thread/tls.h \
|
||||
libc/thread/tls2.h
|
||||
|
||||
LIBC_THREAD_A_OBJS = \
|
||||
$(LIBC_THREAD_A_SRCS_S:%.S=o/$(MODE)/%.o) \
|
||||
$(LIBC_THREAD_A_SRCS_C:%.c=o/$(MODE)/%.o)
|
||||
|
@ -39,7 +33,8 @@ LIBC_THREAD_A_DIRECTDEPS = \
|
|||
LIBC_STUBS \
|
||||
LIBC_SYSV \
|
||||
LIBC_SYSV_CALLS \
|
||||
LIBC_NEXGEN32E
|
||||
LIBC_NEXGEN32E \
|
||||
THIRD_PARTY_NSYNC
|
||||
|
||||
LIBC_THREAD_A_DEPS := \
|
||||
$(call uniq,$(foreach x,$(LIBC_THREAD_A_DIRECTDEPS),$($(x))))
|
||||
|
@ -53,6 +48,11 @@ $(LIBC_THREAD_A).pkg: \
|
|||
$(LIBC_THREAD_A_OBJS) \
|
||||
$(foreach x,$(LIBC_THREAD_A_DIRECTDEPS),$($(x)_A).pkg)
|
||||
|
||||
$(LIBC_THREAD_A_OBJS): private \
|
||||
OVERRIDE_CCFLAGS += \
|
||||
-ffunction-sections \
|
||||
-fdata-sections
|
||||
|
||||
LIBC_THREAD_LIBS = $(foreach x,$(LIBC_THREAD_ARTIFACTS),$($(x)))
|
||||
LIBC_THREAD_SRCS = $(foreach x,$(LIBC_THREAD_ARTIFACTS),$($(x)_SRCS))
|
||||
LIBC_THREAD_HDRS = $(foreach x,$(LIBC_THREAD_ARTIFACTS),$($(x)_HDRS))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue