cosmopolitan/third_party/nsync
Justine Tunney 7b26b42769 Pay off more technical debt
This makes breaking changes to add underscores to many non-standard
function names provided by the c library. MODE=tiny is now tinier and
we now use smaller locks that are better for tiny apps in this mode.
Some headers have been renamed to be in the same folder as the build
package, so it'll be easier to know which build dependency is needed.
Certain old misguided interfaces have been removed. Intel intrinsics
headers are now listed in libc/isystem (but not in the amalgamation)
to help further improve open source compatibility. Header complexity
has also been reduced. Lastly, more shell scripts are now available.

Compared to 6f7d0cb1c3, some tiny corrections were made in libc/intrin/g_fds.c and libc/zipos/open.c including double semi colons and incorrect indentation for existing vista changes that were manually pulled from this commit previously.
2023-03-20 21:07:01 -04:00
..
atomic.h Optimize memory layout 2023-03-20 21:07:01 -04:00
atomic.internal.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
common.c Add *NSYNC mu_test 2022-09-11 18:56:29 -07:00
common.internal.h Add *NSYNC mu_test 2022-09-11 18:56:29 -07:00
counter.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
cv.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
debug.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
dll.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
dll.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
futex.c Pay off more technical debt 2023-03-20 21:07:01 -04:00
futex.internal.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
LICENSE.txt Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
malloc.c Pay off more technical debt 2023-03-20 21:07:01 -04:00
malloc.internal.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu.c Add *NSYNC mu_test 2022-09-11 18:56:29 -07:00
mu.h Pay off more technical debt 2023-03-20 21:07:01 -04:00
mu_semaphore.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu_semaphore.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu_semaphore.internal.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu_semaphore_futex.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
mu_semaphore_win32.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -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 Optimize memory layout 2023-03-20 21:07:01 -04:00
once.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
panic.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
races.internal.h Add *NSYNC mu_test 2022-09-11 18:56:29 -07:00
README.md Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
time.c Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
time.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -07:00
wait_s.internal.h Use *NSYNC for POSIX threads locking APIs 2022-09-11 11:04:50 -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 Pay off more technical debt 2023-03-20 21:07:01 -04:00

*NSYNC

The THIRD_PARTY_NSYNC and LIBC_THREAD packages include source code from *NSYNC. Here's the latest upstream synchronization point:

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.