Lines Matching full:ceil
191 * u32 get_random_u32_below(u32 ceil)
193 * u32 get_random_u32_inclusive(u32 floor, u32 ceil)
556 u32 __get_random_u32_below(u32 ceil) in DEFINE_BATCHED_ENTROPY()
559 * This is the slow path for variable ceil. It is still fast, most of in DEFINE_BATCHED_ENTROPY()
561 * opportunistically comparing the lower half to ceil itself, before in DEFINE_BATCHED_ENTROPY()
563 * whose lower half would indicate a range indivisible by ceil. The use in DEFINE_BATCHED_ENTROPY()
564 * of `-ceil % ceil` is analogous to `2^32 % ceil`, but is computable in DEFINE_BATCHED_ENTROPY()
571 * This function is technically undefined for ceil == 0, and in fact in DEFINE_BATCHED_ENTROPY()
578 if (unlikely(!ceil)) in DEFINE_BATCHED_ENTROPY()
581 mult = (u64)ceil * rand; in DEFINE_BATCHED_ENTROPY()
582 if (unlikely((u32)mult < ceil)) { in DEFINE_BATCHED_ENTROPY()
583 u32 bound = -ceil % ceil; in DEFINE_BATCHED_ENTROPY()
585 mult = (u64)ceil * get_random_u32(); in DEFINE_BATCHED_ENTROPY()