MCPcopy Create free account
hub / github.com/GJDuck/e9patch / rand

Function rand

examples/stdlib.c:5681–5691  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5679}
5680
5681static int rand(void)
5682{
5683 uint32_t x, y;
5684 do
5685 {
5686 x = rand_state;
5687 y = (1103515245 * x + 12345) & 0x7FFFFFFF;
5688 }
5689 while (!__sync_bool_compare_and_swap(&rand_state, x, y));
5690 return (y >> 16);
5691}
5692
5693/****************************************************************************/
5694/* SOCKET */

Callers 3

test_qsortFunction · 0.85
makeMatchValueFunction · 0.85
sendLoadArgumentMetadataFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_qsortFunction · 0.68