[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [UNIKRAFT PATCH, v2, 07/15] lib/ukring: Rename single and multiple consumer functions
This commit renames the _sc suffix to _single on functions which are intended for use by a single bufffer ring consumer. Additionally, removing the _mc suffix from uk_ring_enqueue to encourage it as the default operation for removing items from a ring buffer. Signed-off-by: Alexander Jung <alexander.jung@xxxxxxxxx> --- lib/ukring/include/uk/ring.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ukring/include/uk/ring.h b/lib/ukring/include/uk/ring.h index f19b13e..1cc8982 100644 --- a/lib/ukring/include/uk/ring.h +++ b/lib/ukring/include/uk/ring.h @@ -128,7 +128,7 @@ uk_ring_enqueue(struct uk_ring *r, void *buf) * */ static __inline void * -uk_ring_dequeue_mc(struct uk_ring *r) +uk_ring_dequeue(struct uk_ring *r) { uint32_t cons_head, cons_next; void *buf; @@ -174,7 +174,7 @@ uk_ring_dequeue_mc(struct uk_ring *r) * e.g. a network driver's tx queue lock */ static __inline void * -uk_ring_dequeue_sc(struct uk_ring *r) +uk_ring_dequeue_single(struct uk_ring *r) { uint32_t cons_head, cons_next; #ifdef PREFETCH_DEFINED @@ -192,7 +192,7 @@ uk_ring_dequeue_sc(struct uk_ring *r) * FreeBSD-12. * * Preventing following situation: - * Core(0) - uk_ring_enqueue() Core(1) - uk_ring_dequeue_sc() + * Core(0) - uk_ring_enqueue() Core(1) - uk_ring_dequeue_single() * ----------------------------------------- ---------------------------------------------- * * cons_head = r->cons_head; @@ -258,7 +258,7 @@ uk_ring_dequeue_sc(struct uk_ring *r) * e.g. a network driver's tx queue lock */ static __inline void -uk_ring_advance_sc(struct uk_ring *r) +uk_ring_advance_single(struct uk_ring *r) { uint32_t cons_head, cons_next; uint32_t prod_tail; @@ -296,7 +296,7 @@ uk_ring_advance_sc(struct uk_ring *r) * the compare and an atomic. */ static __inline void -uk_ring_putback_sc(struct uk_ring *r, void *new) +uk_ring_putback_single(struct uk_ring *r, void *new) { /* Buffer ring has none in putback */ UK_ASSERT(r->cons_head != r->prod_tail); @@ -329,7 +329,7 @@ uk_ring_peek(struct uk_ring *r) } static __inline void * -uk_ring_peek_clear_sc(struct uk_ring *r) +uk_ring_peek_clear_single(struct uk_ring *r) { #ifdef DEBUG_BUFRING void *ret; -- 2.20.1
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |