mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-19 00:50:30 +00:00
Rename rand64() to _rand64()
This commit is contained in:
parent
c424352a0a
commit
7ae556463a
52 changed files with 141 additions and 139 deletions
|
@ -29,7 +29,7 @@
|
|||
* 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. This optimization helps make functions like
|
||||
* rand64() fork-safe, however it could lead to race conditions in
|
||||
* _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.
|
||||
*
|
||||
|
|
|
@ -46,7 +46,7 @@ static struct {
|
|||
* @threadsafe
|
||||
* @vforksafe
|
||||
*/
|
||||
uint64_t rand64(void) {
|
||||
uint64_t _rand64(void) {
|
||||
void *p;
|
||||
uint128_t s;
|
||||
if (__threaded) pthread_spin_lock(&g_rand64.lock);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue