Changeset c718bda in mainline for uspace/lib/c/generic/stdlib.c
- Timestamp:
- 2018-01-15T21:40:49Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- dbbbe75b
- Parents:
- ba29018
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:20:07)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-15 21:40:49)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/stdlib.c
rba29018 rc718bda 35 35 #include <stdlib.h> 36 36 37 static longglbl_seed = 1;37 static int glbl_seed = 1; 38 38 39 long int random(void)39 int rand(void) 40 40 { 41 41 return glbl_seed = ((1366 * glbl_seed + 150889) % RAND_MAX); 42 42 } 43 43 44 void srand om(unsigned int seed)44 void srand(unsigned int seed) 45 45 { 46 46 glbl_seed = seed % RAND_MAX;
Note:
See TracChangeset
for help on using the changeset viewer.