Fix some issues and do some code cleanup

This commit is contained in:
Justine Tunney 2022-05-23 10:15:53 -07:00
parent 1f229e4efc
commit 312ed5c67c
72 changed files with 880 additions and 982 deletions

View file

@ -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) {