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

NAME

4     ck_pr_fence_load — enforce partial ordering of load operations
5

LIBRARY

7     Concurrency Kit (libck, -lck)
8

SYNOPSIS

10     #include <ck_pr.h>
11
12     void
13     ck_pr_fence_load(void);
14
15     void
16     ck_pr_fence_strict_load(void);
17

DESCRIPTION

19     This function enforces the ordering of any memory load and ck_pr_load(3)
20     operations relative to the invocation of the function. Any store opera‐
21     tions that were committed on remote processors and received by the call‐
22     ing processor before the invocation of ck_pr_fence_load() is also be made
23     visible only after a call to ck_pr_fence_load().  This function always
24     serves as an implicit compiler barrier.  On architectures with CK_MD_TSO
25     or CK_MD_PSO specified (total store ordering and partial store ordering
26     respectively), this operation only serves as a compiler barrier and no
27     fence instructions will be emitted. To force the unconditional emission
28     of a load fence, use ck_pr_fence_strict_load().  Architectures implement‐
29     ing CK_MD_RMO always emit a load fence.
30

EXAMPLE

32           #include <ck_pr.h>
33
34           static unsigned int a;
35           static unsigned int b;
36
37           void
38           function(void)
39           {
40                   unsigned int snapshot_a, snapshot_b;
41
42                   snapshot_a = ck_pr_load_uint(&a);
43
44                   /*
45                    * Guarantee that the load from "a" completes
46                    * before the load from "b".
47                    */
48                   ck_pr_fence_load();
49                   snapshot_b = ck_pr_load_uint(&b);
50
51                   return;
52           }
53

RETURN VALUES

55     This function has no return value.
56

SEE ALSO

58     ck_pr_stall(3), ck_pr_fence_atomic(3), ck_pr_fence_atomic_store(3),
59     ck_pr_fence_atomic_load(3), ck_pr_fence_load_atomic(3),
60     ck_pr_fence_load_store(3), ck_pr_fence_load_depends(3),
61     ck_pr_fence_store(3), ck_pr_fence_memory(3), ck_pr_barrier(3),
62     ck_pr_fas(3), ck_pr_load(3), ck_pr_store(3), ck_pr_faa(3), ck_pr_inc(3),
63     ck_pr_dec(3), ck_pr_neg(3), ck_pr_not(3), ck_pr_add(3), ck_pr_sub(3),
64     ck_pr_and(3), ck_pr_or(3), ck_pr_xor(3), ck_pr_cas(3), ck_pr_btc(3),
65     ck_pr_bts(3), ck_pr_btr(3)
66
67     Additional information available at http://concurrencykit.org/
68
69                                 April 7, 2013
Impressum