1CK_EPOCH_RECLAIM(3)      BSD Library Functions Manual      CK_EPOCH_RECLAIM(3)
2

NAME

4     ck_epoch_reclaim — immediately execute all deferred callbacks
5

LIBRARY

7     Concurrency Kit (libck, -lck)
8

SYNOPSIS

10     #include <ck_epoch.h>
11
12     void
13     ck_epoch_reclaim(ck_epoch_record_t *record);
14

DESCRIPTION

16     The ck_epoch_reclaim(3) function will unconditionally execute all call‐
17     backs that have been deferred with ck_epoch_call(3).
18

EXAMPLE

20           #include <ck_epoch.h>
21           #include <ck_stack.h>
22           #include <stdlib.h>
23
24           /*
25            * epoch was previously initialized with ck_epoch_init.
26            */
27           ck_epoch_t *epoch;
28
29           void
30           function(void)
31           {
32                   ck_epoch_record_t *record;
33
34                   logically_delete(object);
35                   ck_epoch_call(epoch, record, &object->epoch_entry, destructor);
36
37                   /*
38                    * Wait until no threads could possibly have a reference to the
39                    * object we just deleted.
40                    */
41                   ck_epoch_synchronize(epoch, record);
42
43                   /*
44                    * Execute all deferred callbacks.
45                    */
46                   ck_epoch_reclaim(record);
47
48                   return;
49           }
50

RETURN VALUES

52     This function has no return value.
53

SEE ALSO

55     ck_epoch_init(3), ck_epoch_register(3), ck_epoch_unregister(3),
56     ck_epoch_recycle(3), ck_epoch_poll(3), ck_epoch_reclaim(3),
57     ck_epoch_barrier(3), ck_epoch_call(3), ck_epoch_begin(3), ck_epoch_end(3)
58
59     Additional information available at http://concurrencykit.org/
60
61                                  May 2, 2013
Impressum