concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.38k stars 313 forks source link

ck_epoch documentation out of date #76

Closed mattmacy closed 8 years ago

mattmacy commented 8 years ago

A number of the ck_epoch functions take an extra argument now. Discovering this at compile time rather than from the man pages is a bit disconcerting.

cognet commented 8 years ago

Hi,

I just checked the manpages, and beside ck_epoch_poll which was indeed outdated and claimed an extra arg, I see no error, can you be more specific ?

Thanks !

mattmacy commented 8 years ago

https://reviews.freebsd.org/D6696

Basically any place you see a NULL passed to a ck_epoch function. The two that stand out are ck_epoch_begin and ck_epoch_end. The man pages make no mention of a ck_epoch_section_t that I saw (I may have overlooked it).

sbahra commented 8 years ago

They do reference the argument, see http://concurrencykit.org/doc/ck_epoch_begin.html http://concurrencykit.org/doc/ck_epoch_end.html - however, section is incorrectly documented as mandatory. Will point out it isn't mandatory and close.

Thanks.

mattmacy commented 8 years ago

http://concurrencykit.org/doc/ck_epoch_barrier.html This is the main code example I used as reference. It doesn't use sections.

mattmacy commented 8 years ago

I didn't look at the ckepoch{begin, end} because they had no usage example.

mattmacy commented 8 years ago

I see now. I'm sorry for the noise. What is the benefit of the epoch being refreshed on recursion?

mattmacy commented 8 years ago

Feel a bit sheepish. Will close and just assume that you'll update the epoch_barrier example and clarify the benefit of epoch refresh.

sbahra commented 8 years ago

haha, please don't feel sheepish. Thanks for bringing this to our attention.