mirror of
https://github.com/reactos/reactos.git
synced 2025-06-20 07:36:05 +00:00
Create a branch for network fixes.
svn path=/branches/aicom-network-fixes/; revision=34994
This commit is contained in:
parent
0e213bbc00
commit
c501d8112c
18148 changed files with 0 additions and 860488 deletions
27
lib/sdk/crt/math/rand.c
Normal file
27
lib/sdk/crt/math/rand.c
Normal file
|
@ -0,0 +1,27 @@
|
|||
/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
|
||||
#include <precomp.h>
|
||||
|
||||
#include <internal/tls.h>
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
int
|
||||
rand(void)
|
||||
{
|
||||
PTHREADDATA ThreadData = GetThreadData();
|
||||
|
||||
ThreadData->tnext = ThreadData->tnext * 0x5deece66dLL + 2531011;
|
||||
return (int)((ThreadData->tnext >> 16) & RAND_MAX);
|
||||
}
|
||||
|
||||
/*
|
||||
* @implemented
|
||||
*/
|
||||
void
|
||||
srand(unsigned int seed)
|
||||
{
|
||||
PTHREADDATA ThreadData = GetThreadData();
|
||||
|
||||
ThreadData->tnext = (ULONGLONG)seed;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue