Searched defs:mod (Results 1 - 1 of 1) sorted by relevance

/system/extras/tests/lib/testUtil/
H A DtestUtil.c199 * Pseudo randomly returns unsigned integer in the range [0, mod).
204 uint32_t testRandMod(uint32_t mod) argument
210 uint32_t val = (mod <= lrand48maxVal) ? (uint32_t) lrand48() : testRand();
216 * least significant bits. For small mod values this can produce
217 * noticably non-random sequnces. For mod values of less than 2
220 if (mod <= 0x10000) {
223 // If mod less than a byte, can further combine down to
225 if (mod <= 0x100) {
230 return val % mod;

Completed in 21 milliseconds