Make fixes and improvements

- clock_nanosleep() is now much faster on OpenBSD and NetBSD
- Thread joining is now much faster on NetBSD
- FreeBSD timestamps are now more accurate
- Thread spawning now goes faster on XNU
- Clean up the clone() code
This commit is contained in:
Justine Tunney 2022-11-08 10:09:47 -08:00
parent aee50b1327
commit b407327972
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
47 changed files with 645 additions and 306 deletions

View file

@ -3322,6 +3322,8 @@ unix = {
--- @type integer
CLOCK_MONOTONIC_COARSE = nil,
--- @type integer
CLOCK_MONOTONIC_PRECISE = nil,
--- @type integer
CLOCK_MONOTONIC_FAST = nil,
--- @type integer
CLOCK_MONOTONIC_RAW = nil,
@ -3332,6 +3334,8 @@ unix = {
--- @type integer
CLOCK_REALTIME = nil,
--- @type integer
CLOCK_REALTIME_PRECISE = nil,
--- @type integer
CLOCK_REALTIME_ALARM = nil,
--- @type integer
CLOCK_REALTIME_COARSE = nil,
@ -5247,13 +5251,16 @@ function unix.syslog(priority, msg) end
---
--- - `CLOCK_REALTIME`: universally supported
--- - `CLOCK_REALTIME_FAST`: ditto but faster on freebsd
--- - `CLOCK_REALTIME_PRECISE`: ditto but better on freebsd
--- - `CLOCK_REALTIME_COARSE`: : like `CLOCK_REALTIME_FAST` but needs Linux 2.6.32+
--- - `CLOCK_MONOTONIC`: universally supported
--- - `CLOCK_MONOTONIC_FAST`: ditto but faster on freebsd
--- - `CLOCK_MONOTONIC_RAW`: nearly universally supported
--- - `CLOCK_MONOTONIC_PRECISE`: ditto but better on freebsd
--- - `CLOCK_MONOTONIC_COARSE`: : like `CLOCK_MONOTONIC_FAST` but needs Linux 2.6.32+
--- - `CLOCK_MONOTONIC_RAW`: is actually monotonic but needs Linux 2.6.28+
--- - `CLOCK_PROCESS_CPUTIME_ID`: linux and bsd
--- - `CLOCK_THREAD_CPUTIME_ID`: linux and bsd
--- - `CLOCK_REALTIME_COARSE`: : linux and openbsd
--- - `CLOCK_MONOTONIC_COARSE`: linux
--- - `CLOCK_MONOTONIC_COARSE`: linux, freebsd
--- - `CLOCK_PROF`: linux and netbsd
--- - `CLOCK_BOOTTIME`: linux and openbsd
--- - `CLOCK_REALTIME_ALARM`: linux-only