ck_ring_enqueue_mpsc behavior

70 views
Skip to first unread message

Darryl Rodden

unread,
Jul 25, 2016, 12:41:15 PM7/25/16
to Concurrency Kit
Hi,

I noticed while using ck_ring_enqueue_mpsc() that it behaves a little differently than the other ck_ring_enqueue_* WRT the entry parameter.  When ck_ring_enqueue_mpsc calls the static function _ck_ring_enqueue_mp(), it passes entry as is:
ck_ring_enqueue_mpsc(struct ck_ring *ring,
   
struct ck_ring_buffer *buffer,
   
const void *entry)
{

   
return _ck_ring_enqueue_mp(ring, buffer, entry,
       
sizeof(entry), NULL);
}



This differs from the way that ck_ring_enqueue_mpmc() calls the static function.  Note how it passes entry.
ck_ring_enqueue_mpmc(struct ck_ring *ring,
   
struct ck_ring_buffer *buffer,
   
const void *entry)
{

   
return _ck_ring_enqueue_mp(ring, buffer, &entry,
       
sizeof(entry), NULL);
}


The second syntax matches how the rest of the static _ck_ring_enqueue_* functions are called by the other public enqueue APIs.  They all pass &entry.  Could you take a look?

Thanks!
Darryl

Samy Al Bahra

unread,
Jul 25, 2016, 3:05:40 PM7/25/16
to Concurrency Kit
Hi Darryl,

Thanks for letting us know. This was fixed in master recently and will be included in upcoming patch-level release.

--
You received this message because you are subscribed to the Google Groups "Concurrency Kit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to concurrencyki...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages