Lines Matching refs:ceil
186 * u32 get_random_u32_below(u32 ceil)
188 * u32 get_random_u32_inclusive(u32 floor, u32 ceil)
535 u32 __get_random_u32_below(u32 ceil)
538 * This is the slow path for variable ceil. It is still fast, most of
540 * opportunistically comparing the lower half to ceil itself, before
542 * whose lower half would indicate a range indivisible by ceil. The use
543 * of `-ceil % ceil` is analogous to `2^32 % ceil`, but is computable
550 * This function is technically undefined for ceil == 0, and in fact
557 if (unlikely(!ceil))
560 mult = (u64)ceil * rand;
561 if (unlikely((u32)mult < ceil)) {
562 u32 bound = -ceil % ceil;
564 mult = (u64)ceil * get_random_u32();