NetBSD/lib
riastradh 2a673dcfdb libpthread: New pthread__smt_wait to put CPU in low power for spin.
This is now distinct from pthread__smt_pause, which is for spin lock
backoff with no paired wakeup.

On Arm, there is a single-bit event register per CPU, and there are two
instructions to manage it:

- wfe, wait for event -- if event register is clear, enter low power
  mode and wait until event register is set; then exit low power mode
  and clear event register

- sev, signal event -- sets event register on all CPUs (other
  circumstances like interrupts also set the event register and cause
  wfe to wake)

These can be used to reduce the power consumption of spinning for a
lock, but only if they are actually paired -- if there's no sev, wfe
might hang indefinitely.  Currently only pthread_spin(3) actually
pairs them; the other lock primitives (internal lock, mutex, rwlock)
do not -- they have spin lock backoff loops, but no corresponding
wakeup to cancel a wfe.

It may be worthwhile to teach the other lock primitives to pair
wfe/sev, but that requires some performance measurement to verify
it's actually worthwhile.  So for now, we just make sure not to use
wfe when there's no sev, and keep everything else the same -- this
should fix severe performance degredation in libpthread on Arm
without hurting anything else.

No change in the generated code on amd64 and i386.  No change in the
generated code for pthread_spin.c on arm and aarch64 -- changes only
the generated code for pthread_lock.c, pthread_mutex.c, and
pthread_rwlock.c, as intended.

PR port-arm/57437

XXX pullup-10
2023-05-25 14:30:02 +00:00
..
csu RISC-V support that works on QEMU with a single hart. 2023-05-07 12:41:45 +00:00
i18n_module
libarch
libbluetooth Sections 2 and 3 have RETURN VALUES, not DIAGNOSTICS 2022-12-04 01:29:31 +00:00
libbpfjit
libbsdmalloc
libbz2
libc Add the compat calls for renamed symbols so that configure scripts 2023-05-19 06:50:07 +00:00
libc_aligned Remove comment-outed garbage. 2022-05-30 15:18:32 +00:00
libc_fp
libc_vfp
libcompat Sections 2 and 3 have RETURN VALUES, not DIAGNOSTICS 2022-12-04 01:29:31 +00:00
libcrypt crypt(3): Minor markup tweaks 2023-01-17 14:27:11 +00:00
libcurses Fix spelling of Kurt Shoens surname. 2023-05-04 11:30:25 +00:00
libdm fix misspellings of 'available' and nearby typos 2022-09-10 12:14:17 +00:00
libedit pass lint. 2023-04-25 17:51:32 +00:00
libexecinfo Decode function descriptors (aka plabels) on hppa to fix backtrace. 2022-06-25 06:51:37 +00:00
libform Fix for PR lib/47398 2021-10-25 06:25:18 +00:00
libintl lib: remove CONSTCOND comment 2022-04-19 20:32:14 +00:00
libipsec
libisns Move libisns to /lib to allow /sbin/iscsid to work without /usr being 2022-07-31 12:40:35 +00:00
libkern
libkvm libkvm: suppress lint warnings about extern declarations for now 2023-04-01 09:08:11 +00:00
liblwres
libm fix cross references (from Anon Ymous) 2023-05-08 01:28:35 +00:00
libmenu
libnpf Add method to initialize errinfo so that npfctl does not print random strings. 2022-06-07 16:27:24 +00:00
libnvmm s/premissions/permissions/ 2021-12-10 11:08:45 +00:00
libossaudio lib: Mark up error names in man pages with .Er 2022-12-04 11:25:08 +00:00
libp2k p2k(3): drop reference to rump_smbfs(8). 2022-07-11 19:24:56 +00:00
libpam nix double n, i or g in "ing", in comments and documentation. 2022-10-26 22:09:37 +00:00
libpanel lib: remove CONSTCOND comment 2022-04-19 20:32:14 +00:00
libpci remove clause 3 from all my licenses that aren't conflicting with 2021-12-11 19:24:18 +00:00
libperfuse fix typos in comments. 2023-05-13 11:19:19 +00:00
libposix
libppath lint: warn about extern declarations outside headers 2023-03-28 14:44:34 +00:00
libprop
libpthread libpthread: New pthread__smt_wait to put CPU in low power for spin. 2023-05-25 14:30:02 +00:00
libpuffs libpuffs: ignore lint warning about nested extern for now 2023-03-31 04:51:32 +00:00
libquota Fix default quota file names, both user and group quota used the 2022-04-26 15:36:42 +00:00
libradius
librefuse Fix incorrect test for FUSE_USE_VERSION 34 2023-04-21 19:29:31 +00:00
libresolv fix various typos in comments and messages. 2022-11-02 20:38:21 +00:00
librmt lib: Mark up error names in man pages with .Er 2022-12-04 11:25:08 +00:00
librpcsvc s/sytem/system/ 2022-01-01 10:32:28 +00:00
librt Sections 2 and 3 have RETURN VALUES, not DIAGNOSTICS 2022-12-04 01:29:31 +00:00
librump Force at most partial RELRO for rump_server and related libraries 2021-11-01 21:37:32 +00:00
librumpclient Force at most partial RELRO for rump_server and related libraries 2021-11-01 21:37:32 +00:00
librumpdev Force at most partial RELRO for rump_server and related libraries 2021-11-01 21:37:32 +00:00
librumphijack fix various typos in comments and log messages. 2022-04-16 18:15:20 +00:00
librumpnet Force at most partial RELRO for rump_server and related libraries 2021-11-01 21:37:32 +00:00
librumpres Force at most partial RELRO for rump_server and related libraries 2021-11-01 21:37:32 +00:00
librumpuser lib: remove CONSTCOND comment 2022-04-19 20:32:14 +00:00
librumpvfs Force at most partial RELRO for rump_server and related libraries 2021-11-01 21:37:32 +00:00
libskey s/charater/character/ in comment. 2023-01-17 14:13:48 +00:00
libss
libtelnet fix various typos in comments, mainly immediatly/immediately/, 2022-02-23 21:54:40 +00:00
libterminfo fix few typos in comments. 2023-01-31 21:11:24 +00:00
libukfs lib: remove CONSTCOND comment 2022-04-19 20:32:14 +00:00
libusbhid usbhid.3: hid_parse_usage_in_page() actually returns int 2022-05-22 05:33:46 +00:00
libutil lint: warn about extern declarations outside headers 2023-03-28 14:44:34 +00:00
libwrap
liby
libz fix various typos, mainly in comments, but also in man pages and log messages. 2021-10-21 13:21:53 +00:00
lua fix vax build 2022-11-23 18:15:43 +00:00
npf
Makefile Introduce libc_aligned.so for evbppc-powerpc32, which provides 2022-05-30 15:06:54 +00:00
Makefile.inc
bumpversion
checkoldver
checkver s/supress/suppress/ 2021-12-05 08:09:30 +00:00
checkvers s/supress/suppress/ 2021-12-05 08:09:30 +00:00