Lines Matching full:mask
61 uint32 mask = 0xFFFFFFFF; in random_upto_makemask() local
64 if ((limit & (mask >> i)) == limit) in random_upto_makemask()
65 mask >>= i; in random_upto_makemask()
66 return mask; in random_upto_makemask()
69 static uint32 random_upto_internal(uint32 limit, uint32 mask) { in random_upto_internal() argument
72 ret = random32() & mask; in random_upto_internal()
78 uint32 mask = random_upto_makemask(limit); in random_upto() local
79 return random_upto_internal(limit, mask); in random_upto()
83 uint32 mask = random_upto_makemask(limit); in random_upto_biased() local
85 uint32 ret = random_upto_internal(limit, mask); in random_upto_biased()
88 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
89 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
90 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
91 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
92 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
93 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
94 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()
95 tmp = random_upto_internal(limit, mask); if (tmp < ret) ret = tmp; in random_upto_biased()