Add buddy_reqs_next_ready / buddy_reqs_done

parent 1902b35a
......@@ -821,6 +821,24 @@ _buddy_get_off_extent(const struct buddy_reqs *reqs, uint8_t n)
return (off);
}
static inline uint8_t
buddy_reqs_next_ready(struct buddy_reqs *reqs)
{
(void) BUDDYF(alloc_async_ready)(reqs);
assert(reqs->i_wait.finid >= reqs->i_wait.next);
return (reqs->i_wait.finid - reqs->i_wait.next);
}
static inline int
buddy_reqs_done(struct buddy_reqs *reqs)
{
uint8_t rdy;
rdy = BUDDYF(alloc_async_ready)(reqs);
assert(rdy <= reqs->n);
return (rdy == reqs->n);
}
#ifndef FREEPAGE_WHEN
static inline struct buddy_off_extent
buddy_get_off_extent(const struct buddy_reqs *reqs, uint8_t n)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment