cosmopolitan/third_party/nsync
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00
..
mem Reduce header complexity 2023-11-28 14:39:42 -08:00
testing Reduce header complexity 2023-11-28 14:39:42 -08:00
array.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
atomic.h Reduce header complexity 2023-11-28 14:39:42 -08:00
atomic.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Rename makefiles BUILD.mk 2023-11-28 11:21:08 -08:00
common.c Reduce header complexity 2023-11-28 14:39:42 -08:00
common.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
compat.S Make improvements 2023-06-15 14:50:53 -07:00
counter.h Reduce header complexity 2023-11-28 14:39:42 -08:00
cv.h Reduce header complexity 2023-11-28 14:39:42 -08:00
debug.h Reduce header complexity 2023-11-28 14:39:42 -08:00
futex.c Reduce header complexity 2023-11-28 14:39:42 -08:00
futex.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
heap.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
LICENSE.txt Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu.c Reduce header complexity 2023-11-28 14:39:42 -08:00
mu.h Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore.c Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore.h Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore_futex.c Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore_gcd.c Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore_sem.c Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_wait.h Reduce header complexity 2023-11-28 14:39:42 -08:00
note.h Reduce header complexity 2023-11-28 14:39:42 -08:00
once.h Reduce header complexity 2023-11-28 14:39:42 -08:00
panic.c Reduce header complexity 2023-11-28 14:39:42 -08:00
races.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
README.cosmo Fix nsync_mu_unlock_slow_() on Apple Silicon 2023-11-13 11:07:13 -08:00
README.md Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
time.h Reduce header complexity 2023-11-28 14:39:42 -08:00
wait_s.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
waiter.h Reduce header complexity 2023-11-28 14:39:42 -08:00
yield.c Reduce header complexity 2023-11-28 14:39:42 -08:00

*NSYNC

*NSYNC is a library providing scalable synchronization primitives. The following packages are provided:

  • THIRD_PARTY_NSYNC has nsync_mu which doesn't depend on malloc().
  • THIRD_PARTY_NSYNC_MEM has the rest of *NSYNC, e.g. nsync_cv.

The origin of this code is here:

git@github.com:google/nsync
ac5489682760393fe21bd2a8e038b528442412a7 (1.25.0)
Author: Mike Burrows <m3b@google.com>
Date:   Wed Jun 1 16:47:52 2022 -0700

NSYNC uses the Apache 2.0 license. We made the following local changes:

  • Write custom nsync_malloc_() so malloc() can use *NSYNC.

  • Rewrite futex() wrapper to support old Linux kernels and OpenBSD.

  • Normalize sources to Cosmopolitan style conventions; *NSYNC upstream supports dozens of compilers and operating systems, at compile-time. Since Cosmo solves portability at runtime instead, most of the build config toil has been removed, in order to help the NSYNC source code be more readable and hackable.