mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-30 16:28:30 +00:00
Fix some issues and do some code cleanup
This commit is contained in:
parent
1f229e4efc
commit
312ed5c67c
72 changed files with 880 additions and 982 deletions
|
@ -22,7 +22,17 @@
|
|||
|
||||
/**
|
||||
* Returns process id.
|
||||
*
|
||||
* This function does not need to issue a system call. The PID is
|
||||
* tracked by a global variable which is updated atfork(). The only
|
||||
* exception is when the process is vfork()'d in which case a system
|
||||
* call shall be issued.
|
||||
*
|
||||
* On Linux, and only Linux, the process id is guaranteed to be the same
|
||||
* as gettid() for the main thread.
|
||||
*
|
||||
* @asyncsignalsafe
|
||||
* @threadsafe
|
||||
* @vforksafe
|
||||
*/
|
||||
int getpid(void) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue