Debian Codegraph @

doc/ck_pr_dec

raw
1 .\"
2 .\" Copyright 2013 Samy Al Bahra.
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\"
14 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
15 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
18 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 .\" SUCH DAMAGE.
25 .\"
26 .\"
27 .Dd April 7, 2013
28 .Dt ck_pr_dec 3
29 .Sh NAME
30 .Nm ck_pr_dec_ptr ,
31 .Nm ck_pr_dec_ptr_zero ,
32 .Nm ck_pr_dec_ptr_is_zero ,
33 .Nm ck_pr_dec_double ,
34 .Nm ck_pr_dec_double_zero ,
35 .Nm ck_pr_dec_double_is_zero ,
36 .Nm ck_pr_dec_char ,
37 .Nm ck_pr_dec_char_zero ,
38 .Nm ck_pr_dec_char_is_zero ,
39 .Nm ck_pr_dec_uint ,
40 .Nm ck_pr_dec_uint_zero ,
41 .Nm ck_pr_dec_char_is_zero ,
42 .Nm ck_pr_dec_int ,
43 .Nm ck_pr_dec_int_zero ,
44 .Nm ck_pr_dec_int_is_zero ,
45 .Nm ck_pr_dec_64 ,
46 .Nm ck_pr_dec_64_zero ,
47 .Nm ck_pr_dec_64_is_zero ,
48 .Nm ck_pr_dec_32 ,
49 .Nm ck_pr_dec_32_zero ,
50 .Nm ck_pr_dec_32_is_zero ,
51 .Nm ck_pr_dec_16 ,
52 .Nm ck_pr_dec_16_zero ,
53 .Nm ck_pr_dec_32_is_zero ,
54 .Nm ck_pr_dec_8 ,
55 .Nm ck_pr_dec_8_zero ,
56 .Nm ck_pr_dec_8_is_zero
57 .Nd atomic decrement operations
58 .Sh LIBRARY
59 Concurrency Kit (libck, \-lck)
60 .Sh SYNOPSIS
61 .In ck_pr.h
62 .Ft void
63 .Fn ck_pr_dec_ptr "void *target"
64 .Ft void
65 .Fn ck_pr_dec_ptr_zero "void *target" "bool *z"
66 .Ft bool
67 .Fn ck_pr_dec_ptr_is_zero "void *target"
68 .Ft void
69 .Fn ck_pr_dec_double "double *target"
70 .Ft void
71 .Fn ck_pr_dec_double_zero "double *target" "bool *z"
72 .Ft bool
73 .Fn ck_pr_dec_double_is_zero "double *target"
74 .Ft void
75 .Fn ck_pr_dec_char "char *target"
76 .Ft void
77 .Fn ck_pr_dec_char_zero "char *target" "bool *z"
78 .Ft bool
79 .Fn ck_pr_dec_char_is_zero "char *target"
80 .Ft void
81 .Fn ck_pr_dec_uint "unsigned int *target"
82 .Ft void
83 .Fn ck_pr_dec_uint_zero "unsigned int *target" "bool *z"
84 .Ft bool
85 .Fn ck_pr_dec_uint_is_zero "unsigned int *target"
86 .Ft void
87 .Fn ck_pr_dec_int "int *target"
88 .Ft void
89 .Fn ck_pr_dec_int_zero "int *target" "bool *z"
90 .Ft bool
91 .Fn ck_pr_dec_int_is_zero "int *target"
92 .Ft void
93 .Fn ck_pr_dec_64 "uint64_t *target"
94 .Ft void
95 .Fn ck_pr_dec_64_zero "uint64_t *target" "bool *z"
96 .Ft bool
97 .Fn ck_pr_dec_64_is_zero "uint64_t *target"
98 .Ft void
99 .Fn ck_pr_dec_32 "uint32_t *target"
100 .Ft void
101 .Fn ck_pr_dec_32_zero "uint32_t *target" "bool *z"
102 .Ft bool
103 .Fn ck_pr_dec_32_is_zero "uint32_t *target"
104 .Ft void
105 .Fn ck_pr_dec_16 "uint16_t *target"
106 .Ft void
107 .Fn ck_pr_dec_16_zero "uint16_t *target" "bool *z"
108 .Ft bool
109 .Fn ck_pr_dec_16_is_zero "uint16_t *target"
110 .Ft void
111 .Fn ck_pr_dec_8 "uint8_t *target"
112 .Ft void
113 .Fn ck_pr_dec_8_zero "uint8_t *target" "bool *z"
114 .Ft bool
115 .Fn ck_pr_dec_8_is_zero "uint8_t *target"
116 .Sh DESCRIPTION
117 The
118 .Fn ck_pr_dec 3
119 family of functions atomically decrement the value pointed to
120 by
121 .Fa target .
122 .Sh RETURN VALUES
123 The ck_pr_dec_zero family of functions set the value pointed to by
124 .Fa z
125 to true if the result
126 of the decrement operation was 0. They set the value pointed to by
127 .Fa z
128 to false otherwise.
129 The ck_pr_dec_is_zero family of function return true if the result
130 of the decrement operation was 0 and false otherwise.
131 .Sh SEE ALSO
132 .Xr ck_pr_fence_load 3 ,
133 .Xr ck_pr_fence_load_depends 3 ,
134 .Xr ck_pr_fence_store 3 ,
135 .Xr ck_pr_fence_memory 3 ,
136 .Xr ck_pr_load 3 ,
137 .Xr ck_pr_store 3 ,
138 .Xr ck_pr_fas 3 ,
139 .Xr ck_pr_faa 3 ,
140 .Xr ck_pr_inc 3 ,
141 .Xr ck_pr_neg 3 ,
142 .Xr ck_pr_not 3 ,
143 .Xr ck_pr_add 3 ,
144 .Xr ck_pr_sub 3 ,
145 .Xr ck_pr_and 3 ,
146 .Xr ck_pr_or 3 ,
147 .Xr ck_pr_xor 3 ,
148 .Xr ck_pr_cas 3 ,
149 .Xr ck_pr_btc 3 ,
150 .Xr ck_pr_bts 3 ,
151 .Xr ck_pr_btr 3
152 .Pp
153 Additional information available at http://concurrencykit.org/