cosmopolitan/third_party/nsync
Justine Tunney 7e0a09feec
Mint APE Loader v1.5
This change ports APE Loader to Linux AARCH64, so that Raspberry Pi
users can run programs like redbean, without the executable needing
to modify itself. Progress has also slipped into this change on the
issue of making progress better conforming to user expectations and
industry standards regarding which symbols we're allowed to declare
2023-07-26 13:54:49 -07:00
..
mem Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
testing Clean up more code 2023-07-06 08:03:24 -07:00
array.internal.h Clean up some sleep code 2022-10-08 03:00:48 -07:00
atomic.h Validate privileged code relationships 2023-06-08 04:38:06 -07:00
atomic.internal.h Add shared memory apis to redbean 2022-10-06 04:55:26 -07:00
common.c Clean up more code 2023-07-06 08:03:24 -07:00
common.internal.h Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
compat.S Make improvements 2023-06-15 14:50:53 -07:00
counter.h Clean up more code 2023-07-06 08:03:24 -07:00
cv.h Clean up more code 2023-07-06 08:03:24 -07:00
debug.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
futex.c Make improvements 2023-06-15 14:50:53 -07:00
futex.internal.h Make improvements 2022-11-07 02:26:06 -08:00
heap.internal.h Clean up some sleep code 2022-10-08 03:00:48 -07:00
LICENSE.txt Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu.c Clean up more code 2023-07-06 08:03:24 -07:00
mu.h Clean up more code 2023-07-06 08:03:24 -07:00
mu_semaphore.c Get threads working well on MacOS Arm64 2023-06-04 01:57:10 -07:00
mu_semaphore.h Make futexes cancellable by pthreads 2022-11-04 18:36:34 -07:00
mu_semaphore.internal.h Get threads working well on MacOS Arm64 2023-06-04 01:57:10 -07:00
mu_semaphore_futex.c Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
mu_semaphore_gcd.c Clean up more code 2023-07-06 08:03:24 -07:00
mu_semaphore_sem.c Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
mu_wait.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
note.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
nsync.mk Clean up more code 2023-07-06 08:03:24 -07:00
once.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
panic.c Remove some dead code 2023-07-03 02:48:29 -07:00
races.internal.h Add *NSYNC mu_test 2022-09-11 18:56:29 -07:00
README.cosmo Clean up more code 2023-07-06 08:03:24 -07:00
README.md Add *NSYNC to libc/isystem 2022-09-13 01:47:12 -07:00
time.h Improve cancellations, randomness, and time 2022-11-05 23:45:32 -07:00
wait_s.internal.h Clean up more code 2023-07-06 08:03:24 -07:00
waiter.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
waiter_per_thread.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
yield.c Make improvements 2022-11-07 02:26:06 -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.