summaryrefslogtreecommitdiff
path: root/package/libqb/patches/patch-docs_man3_qbatomic_h_3
blob: f41ad1f021a588af282fdcece9580c1812a1ca8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
--- libqb-0.16.0.orig/docs/man3/qbatomic.h.3	2013-07-25 20:16:18.000000000 +0200
+++ libqb-0.16.0/docs/man3/qbatomic.h.3	2013-09-09 05:26:31.415811269 +0200
@@ -1,4 +1,4 @@
-.TH "qbatomic.h" 3 "Thu Jul 25 2013" "Version 0.16.0" "libqb" \" -*- nroff -*-
+.TH "qbatomic.h" 3 "Mon Sep 9 2013" "Version 0.16.0" "libqb" \" -*- nroff -*-
 .ad l
 .nh
 .SH NAME
@@ -16,7 +16,7 @@ Basic atomic integer and pointer operati
 \fC#include <qb/qbconfig\&.h>\fP
 .br
 
-.SS "Macros"
+.SS "Defines"
 
 .in +1c
 .ti -1c
@@ -92,10 +92,9 @@ You must not directly read integers or p
 If you are using those functions for anything apart from simple reference counting, you should really be aware of the implications of doing that\&. There are literally thousands of ways to shoot yourself in the foot\&. So if in doubt, use a pthread_mutex\&. If you don't know, what memory barriers are, do not use anything but \fBqb_atomic_int_inc()\fP and \fBqb_atomic_int_dec_and_test()\fP\&.
 .PP
 It is not safe to set an integer or pointer just by assigning to it, when it is concurrently accessed by other threads with the following functions\&. Use \fBqb_atomic_int_compare_and_exchange()\fP or \fBqb_atomic_pointer_compare_and_exchange()\fP respectively\&. 
-.SH "Macro Definition Documentation"
+.SH "Define Documentation"
 .PP 
-.SS "#define qb_atomic_int_dec_and_test(atomic)   (\fBqb_atomic_int_exchange_and_add\fP ((atomic), -1) == 1)"
-
+.SS "#define \fBqb_atomic_int_dec_and_test\fP(atomic)   (\fBqb_atomic_int_exchange_and_add\fP ((atomic), -1) == 1)"
 .PP
 Atomically decrements the integer pointed to by atomic by 1\&. \fBParameters:\fP
 .RS 4
@@ -108,15 +107,13 @@ QB_TRUE if the integer pointed to by ato
 .RE
 .PP
 
-.SS "#define qb_atomic_int_get(atomic)"
-\fBValue:\fP
+.SS "#define \fBqb_atomic_int_get\fP(atomic)"\fBValue:\fP
 .PP
 .nf
 ((void) sizeof (char* [sizeof (*(atomic)) == sizeof (int32_t) ? 1 : -1]), \
   (qb_atomic_int_get) ((volatile int32_t QB_GNUC_MAY_ALIAS *) (volatile void *) (atomic)))
 .fi
-.SS "#define qb_atomic_int_inc(atomic)   (\fBqb_atomic_int_add\fP ((atomic), 1))"
-
+.SS "#define \fBqb_atomic_int_inc\fP(atomic)   (\fBqb_atomic_int_add\fP ((atomic), 1))"
 .PP
 Atomically increments the integer pointed to by atomic by 1\&. \fBParameters:\fP
 .RS 4
@@ -124,22 +121,19 @@ Atomically increments the integer pointe
 .RE
 .PP
 
-.SS "#define qb_atomic_int_set(atomic, newval)"
-\fBValue:\fP
+.SS "#define \fBqb_atomic_int_set\fP(atomic, newval)"\fBValue:\fP
 .PP
 .nf
 ((void) sizeof (char* [sizeof (*(atomic)) == sizeof (int32_t) ? 1 : -1]), \
   (qb_atomic_int_set) ((volatile int32_t QB_GNUC_MAY_ALIAS *) (volatile void *) (atomic), (newval)))
 .fi
-.SS "#define qb_atomic_pointer_get(atomic)"
-\fBValue:\fP
+.SS "#define \fBqb_atomic_pointer_get\fP(atomic)"\fBValue:\fP
 .PP
 .nf
 ((void) sizeof (char* [sizeof (*(atomic)) == sizeof (void*) ? 1 : -1]), \
   (qb_atomic_pointer_get) ((volatile void* QB_GNUC_MAY_ALIAS *) (volatile void *) (atomic)))
 .fi
-.SS "#define qb_atomic_pointer_set(atomic, newval)"
-\fBValue:\fP
+.SS "#define \fBqb_atomic_pointer_set\fP(atomic, newval)"\fBValue:\fP
 .PP
 .nf
 ((void) sizeof (char* [sizeof (*(atomic)) == sizeof (void*) ? 1 : -1]), \
@@ -147,10 +141,8 @@ Atomically increments the integer pointe
 .fi
 .SH "Function Documentation"
 .PP 
-.SS "void qb_atomic_init (void)"
-
-.SS "void qb_atomic_int_add (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_tval)"
-
+.SS "void \fBqb_atomic_init\fP (void)"
+.SS "void \fBqb_atomic_int_add\fP (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_tval)"
 .PP
 Atomically adds val to the integer pointed to by atomic\&. Also acts as a memory barrier\&.
 .PP
@@ -162,8 +154,7 @@ Atomically adds val to the integer point
 .RE
 .PP
 
-.SS "int32_t qb_atomic_int_compare_and_exchange (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_toldval, int32_tnewval)"
-
+.SS "int32_t \fBqb_atomic_int_compare_and_exchange\fP (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_toldval, int32_tnewval)"
 .PP
 Compares oldval with the integer pointed to by atomic and if they are equal, atomically exchanges *atomic with newval\&. Also acts as a memory barrier\&.
 .PP
@@ -182,8 +173,7 @@ QB_TRUE, if *atomic was equal oldval\&.
 .RE
 .PP
 
-.SS "int32_t qb_atomic_int_exchange_and_add (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_tval)"
-
+.SS "int32_t \fBqb_atomic_int_exchange_and_add\fP (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_tval)"
 .PP
 Atomically adds val to the integer pointed to by atomic\&. It returns the value of *atomic just before the addition took place\&. Also acts as a memory barrier\&.
 .PP
@@ -200,8 +190,7 @@ the value of *atomic before the addition
 .RE
 .PP
 
-.SS "int32_t qb_atomic_int_get (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic)"
-
+.SS "int32_t \fBqb_atomic_int_get\fP (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic)"
 .PP
 Reads the value of the integer pointed to by atomic\&. Also acts as a memory barrier\&.
 .PP
@@ -216,8 +205,7 @@ the value of atomic
 .RE
 .PP
 
-.SS "void qb_atomic_int_set (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_tnewval)"
-
+.SS "void \fBqb_atomic_int_set\fP (volatile int32_t \fBQB_GNUC_MAY_ALIAS\fP *atomic, int32_tnewval)"
 .PP
 Sets the value of the integer pointed to by atomic\&. Also acts as a memory barrier\&.
 .PP
@@ -229,8 +217,7 @@ Sets the value of the integer pointed to
 .RE
 .PP
 
-.SS "int32_t qb_atomic_pointer_compare_and_exchange (volatile void *\fBQB_GNUC_MAY_ALIAS\fP *atomic, void *oldval, void *newval)"
-
+.SS "int32_t \fBqb_atomic_pointer_compare_and_exchange\fP (volatile void *\fBQB_GNUC_MAY_ALIAS\fP *atomic, void *oldval, void *newval)"
 .PP
 Compares oldval with the pointer pointed to by atomic and if they are equal, atomically exchanges *atomic with newval\&. Also acts as a memory barrier\&.
 .PP
@@ -249,8 +236,7 @@ QB_TRUE if atomic was equal oldval, else
 .RE
 .PP
 
-.SS "void* qb_atomic_pointer_get (volatile void *\fBQB_GNUC_MAY_ALIAS\fP *atomic)"
-
+.SS "void* \fBqb_atomic_pointer_get\fP (volatile void *\fBQB_GNUC_MAY_ALIAS\fP *atomic)"
 .PP
 Reads the value of the pointer pointed to by atomic\&. Also acts as a memory barrier\&.
 .PP
@@ -265,8 +251,7 @@ the value to add to atomic\&.
 .RE
 .PP
 
-.SS "void qb_atomic_pointer_set (volatile void *\fBQB_GNUC_MAY_ALIAS\fP *atomic, void *newval)"
-
+.SS "void \fBqb_atomic_pointer_set\fP (volatile void *\fBQB_GNUC_MAY_ALIAS\fP *atomic, void *newval)"
 .PP
 Sets the value of the pointer pointed to by atomic\&. Also acts as a memory barrier\&.
 .PP