mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 08:18:30 +00:00
Introduce MODE=fastbuild
for 28% speedup
This commit is contained in:
parent
094ccbb4bd
commit
1729a8259c
14 changed files with 82 additions and 111 deletions
|
@ -27,7 +27,10 @@
|
|||
* This function does not need to issue a system call. The PID is
|
||||
* tracked by a global variable which is updated at fork(). The only
|
||||
* exception is when the process is vfork()'d in which case a system
|
||||
* call shall be issued.
|
||||
* call shall be issued. This optimization helps make functions like
|
||||
* rand64() fork-safe, however it could lead to race conditions in
|
||||
* programs that mix fork() with threads. In that case, apps should
|
||||
* consider using `sys_getpid().ax` instead to force a system call.
|
||||
*
|
||||
* On Linux, and only Linux, the process id is guaranteed to be the same
|
||||
* as gettid() for the main thread.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue