cosmopolitan/third_party/nsync
Jōshin e16a7d8f3b
flip et / noet in modelines
`et` means `expandtab`.

```sh
rg 'vi: .* :vi' -l -0 | \
  xargs -0 sed -i '' 's/vi: \(.*\) et\(.*\)  :vi/vi: \1 xoet\2:vi/'
rg 'vi: .*  :vi' -l -0 | \
  xargs -0 sed -i '' 's/vi: \(.*\)noet\(.*\):vi/vi: \1et\2  :vi/'
rg 'vi: .*  :vi' -l -0 | \
  xargs -0 sed -i '' 's/vi: \(.*\)xoet\(.*\):vi/vi: \1noet\2:vi/'
```
2023-12-07 22:17:11 -05:00
..
mem flip et / noet in modelines 2023-12-07 22:17:11 -05:00
testing flip et / noet in modelines 2023-12-07 22:17:11 -05: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 flip et / noet in modelines 2023-12-07 22:17:11 -05:00
common.internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
compat.S flip et / noet in modelines 2023-12-07 22:17:11 -05: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 flip et / noet in modelines 2023-12-07 22:17:11 -05: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 flip et / noet in modelines 2023-12-07 22:17:11 -05:00
mu.h Reduce header complexity 2023-11-28 14:39:42 -08:00
mu_semaphore.c flip et / noet in modelines 2023-12-07 22:17:11 -05: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 flip et / noet in modelines 2023-12-07 22:17:11 -05:00
mu_semaphore_gcd.c flip et / noet in modelines 2023-12-07 22:17:11 -05:00
mu_semaphore_sem.c flip et / noet in modelines 2023-12-07 22:17:11 -05: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 flip et / noet in modelines 2023-12-07 22:17:11 -05: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 flip et / noet in modelines 2023-12-07 22:17:11 -05: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.