Loading...
Searching...
No Matches
Go to the documentation of this file.
26#if defined(AO_HAVE_load) && !defined(AO_HAVE_int_load)
27# define AO_int_load(addr) \
28 (unsigned)AO_load((const volatile AO_t *)(addr))
29# define AO_HAVE_int_load
32#if defined(AO_HAVE_store) && !defined(AO_HAVE_int_store)
33# define AO_int_store(addr, val) \
34 AO_store((volatile AO_t *)(addr), (AO_t)(val))
35# define AO_HAVE_int_store
38#if defined(AO_HAVE_fetch_and_add) \
39 && !defined(AO_HAVE_int_fetch_and_add)
40# define AO_int_fetch_and_add(addr, incr) \
41 (unsigned)AO_fetch_and_add((volatile AO_t *)(addr), \
43# define AO_HAVE_int_fetch_and_add
46#if defined(AO_HAVE_fetch_and_add1) \
47 && !defined(AO_HAVE_int_fetch_and_add1)
48# define AO_int_fetch_and_add1(addr) \
49 (unsigned)AO_fetch_and_add1((volatile AO_t *)(addr))
50# define AO_HAVE_int_fetch_and_add1
53#if defined(AO_HAVE_fetch_and_sub1) \
54 && !defined(AO_HAVE_int_fetch_and_sub1)
55# define AO_int_fetch_and_sub1(addr) \
56 (unsigned)AO_fetch_and_sub1((volatile AO_t *)(addr))
57# define AO_HAVE_int_fetch_and_sub1
60#if defined(AO_HAVE_and) && !defined(AO_HAVE_int_and)
61# define AO_int_and(addr, val) \
62 AO_and((volatile AO_t *)(addr), (AO_t)(val))
63# define AO_HAVE_int_and
66#if defined(AO_HAVE_or) && !defined(AO_HAVE_int_or)
67# define AO_int_or(addr, val) \
68 AO_or((volatile AO_t *)(addr), (AO_t)(val))
69# define AO_HAVE_int_or
72#if defined(AO_HAVE_xor) && !defined(AO_HAVE_int_xor)
73# define AO_int_xor(addr, val) \
74 AO_xor((volatile AO_t *)(addr), (AO_t)(val))
75# define AO_HAVE_int_xor
78#if defined(AO_HAVE_fetch_compare_and_swap) \
79 && !defined(AO_HAVE_int_fetch_compare_and_swap)
80# define AO_int_fetch_compare_and_swap(addr, old, new_val) \
81 (unsigned)AO_fetch_compare_and_swap((volatile AO_t *)(addr), \
82 (AO_t)(old), (AO_t)(new_val))
83# define AO_HAVE_int_fetch_compare_and_swap
86#if defined(AO_HAVE_compare_and_swap) \
87 && !defined(AO_HAVE_int_compare_and_swap)
88# define AO_int_compare_and_swap(addr, old, new_val) \
89 AO_compare_and_swap((volatile AO_t *)(addr), \
90 (AO_t)(old), (AO_t)(new_val))
91# define AO_HAVE_int_compare_and_swap
118#if defined(AO_HAVE_load_full) && !defined(AO_HAVE_int_load_full)
119# define AO_int_load_full(addr) \
120 (unsigned)AO_load_full((const volatile AO_t *)(addr))
121# define AO_HAVE_int_load_full
124#if defined(AO_HAVE_store_full) && !defined(AO_HAVE_int_store_full)
125# define AO_int_store_full(addr, val) \
126 AO_store_full((volatile AO_t *)(addr), (AO_t)(val))
127# define AO_HAVE_int_store_full
130#if defined(AO_HAVE_fetch_and_add_full) \
131 && !defined(AO_HAVE_int_fetch_and_add_full)
132# define AO_int_fetch_and_add_full(addr, incr) \
133 (unsigned)AO_fetch_and_add_full((volatile AO_t *)(addr), \
135# define AO_HAVE_int_fetch_and_add_full
138#if defined(AO_HAVE_fetch_and_add1_full) \
139 && !defined(AO_HAVE_int_fetch_and_add1_full)
140# define AO_int_fetch_and_add1_full(addr) \
141 (unsigned)AO_fetch_and_add1_full((volatile AO_t *)(addr))
142# define AO_HAVE_int_fetch_and_add1_full
145#if defined(AO_HAVE_fetch_and_sub1_full) \
146 && !defined(AO_HAVE_int_fetch_and_sub1_full)
147# define AO_int_fetch_and_sub1_full(addr) \
148 (unsigned)AO_fetch_and_sub1_full((volatile AO_t *)(addr))
149# define AO_HAVE_int_fetch_and_sub1_full
152#if defined(AO_HAVE_and_full) && !defined(AO_HAVE_int_and_full)
153# define AO_int_and_full(addr, val) \
154 AO_and_full((volatile AO_t *)(addr), (AO_t)(val))
155# define AO_HAVE_int_and_full
158#if defined(AO_HAVE_or_full) && !defined(AO_HAVE_int_or_full)
159# define AO_int_or_full(addr, val) \
160 AO_or_full((volatile AO_t *)(addr), (AO_t)(val))
161# define AO_HAVE_int_or_full
164#if defined(AO_HAVE_xor_full) && !defined(AO_HAVE_int_xor_full)
165# define AO_int_xor_full(addr, val) \
166 AO_xor_full((volatile AO_t *)(addr), (AO_t)(val))
167# define AO_HAVE_int_xor_full
170#if defined(AO_HAVE_fetch_compare_and_swap_full) \
171 && !defined(AO_HAVE_int_fetch_compare_and_swap_full)
172# define AO_int_fetch_compare_and_swap_full(addr, old, new_val) \
173 (unsigned)AO_fetch_compare_and_swap_full((volatile AO_t *)(addr), \
174 (AO_t)(old), (AO_t)(new_val))
175# define AO_HAVE_int_fetch_compare_and_swap_full
178#if defined(AO_HAVE_compare_and_swap_full) \
179 && !defined(AO_HAVE_int_compare_and_swap_full)
180# define AO_int_compare_and_swap_full(addr, old, new_val) \
181 AO_compare_and_swap_full((volatile AO_t *)(addr), \
182 (AO_t)(old), (AO_t)(new_val))
183# define AO_HAVE_int_compare_and_swap_full
210#if defined(AO_HAVE_load_acquire) && !defined(AO_HAVE_int_load_acquire)
211# define AO_int_load_acquire(addr) \
212 (unsigned)AO_load_acquire((const volatile AO_t *)(addr))
213# define AO_HAVE_int_load_acquire
216#if defined(AO_HAVE_store_acquire) && !defined(AO_HAVE_int_store_acquire)
217# define AO_int_store_acquire(addr, val) \
218 AO_store_acquire((volatile AO_t *)(addr), (AO_t)(val))
219# define AO_HAVE_int_store_acquire
222#if defined(AO_HAVE_fetch_and_add_acquire) \
223 && !defined(AO_HAVE_int_fetch_and_add_acquire)
224# define AO_int_fetch_and_add_acquire(addr, incr) \
225 (unsigned)AO_fetch_and_add_acquire((volatile AO_t *)(addr), \
227# define AO_HAVE_int_fetch_and_add_acquire
230#if defined(AO_HAVE_fetch_and_add1_acquire) \
231 && !defined(AO_HAVE_int_fetch_and_add1_acquire)
232# define AO_int_fetch_and_add1_acquire(addr) \
233 (unsigned)AO_fetch_and_add1_acquire((volatile AO_t *)(addr))
234# define AO_HAVE_int_fetch_and_add1_acquire
237#if defined(AO_HAVE_fetch_and_sub1_acquire) \
238 && !defined(AO_HAVE_int_fetch_and_sub1_acquire)
239# define AO_int_fetch_and_sub1_acquire(addr) \
240 (unsigned)AO_fetch_and_sub1_acquire((volatile AO_t *)(addr))
241# define AO_HAVE_int_fetch_and_sub1_acquire
244#if defined(AO_HAVE_and_acquire) && !defined(AO_HAVE_int_and_acquire)
245# define AO_int_and_acquire(addr, val) \
246 AO_and_acquire((volatile AO_t *)(addr), (AO_t)(val))
247# define AO_HAVE_int_and_acquire
250#if defined(AO_HAVE_or_acquire) && !defined(AO_HAVE_int_or_acquire)
251# define AO_int_or_acquire(addr, val) \
252 AO_or_acquire((volatile AO_t *)(addr), (AO_t)(val))
253# define AO_HAVE_int_or_acquire
256#if defined(AO_HAVE_xor_acquire) && !defined(AO_HAVE_int_xor_acquire)
257# define AO_int_xor_acquire(addr, val) \
258 AO_xor_acquire((volatile AO_t *)(addr), (AO_t)(val))
259# define AO_HAVE_int_xor_acquire
262#if defined(AO_HAVE_fetch_compare_and_swap_acquire) \
263 && !defined(AO_HAVE_int_fetch_compare_and_swap_acquire)
264# define AO_int_fetch_compare_and_swap_acquire(addr, old, new_val) \
265 (unsigned)AO_fetch_compare_and_swap_acquire((volatile AO_t *)(addr), \
266 (AO_t)(old), (AO_t)(new_val))
267# define AO_HAVE_int_fetch_compare_and_swap_acquire
270#if defined(AO_HAVE_compare_and_swap_acquire) \
271 && !defined(AO_HAVE_int_compare_and_swap_acquire)
272# define AO_int_compare_and_swap_acquire(addr, old, new_val) \
273 AO_compare_and_swap_acquire((volatile AO_t *)(addr), \
274 (AO_t)(old), (AO_t)(new_val))
275# define AO_HAVE_int_compare_and_swap_acquire
302#if defined(AO_HAVE_load_release) && !defined(AO_HAVE_int_load_release)
303# define AO_int_load_release(addr) \
304 (unsigned)AO_load_release((const volatile AO_t *)(addr))
305# define AO_HAVE_int_load_release
308#if defined(AO_HAVE_store_release) && !defined(AO_HAVE_int_store_release)
309# define AO_int_store_release(addr, val) \
310 AO_store_release((volatile AO_t *)(addr), (AO_t)(val))
311# define AO_HAVE_int_store_release
314#if defined(AO_HAVE_fetch_and_add_release) \
315 && !defined(AO_HAVE_int_fetch_and_add_release)
316# define AO_int_fetch_and_add_release(addr, incr) \
317 (unsigned)AO_fetch_and_add_release((volatile AO_t *)(addr), \
319# define AO_HAVE_int_fetch_and_add_release
322#if defined(AO_HAVE_fetch_and_add1_release) \
323 && !defined(AO_HAVE_int_fetch_and_add1_release)
324# define AO_int_fetch_and_add1_release(addr) \
325 (unsigned)AO_fetch_and_add1_release((volatile AO_t *)(addr))
326# define AO_HAVE_int_fetch_and_add1_release
329#if defined(AO_HAVE_fetch_and_sub1_release) \
330 && !defined(AO_HAVE_int_fetch_and_sub1_release)
331# define AO_int_fetch_and_sub1_release(addr) \
332 (unsigned)AO_fetch_and_sub1_release((volatile AO_t *)(addr))
333# define AO_HAVE_int_fetch_and_sub1_release
336#if defined(AO_HAVE_and_release) && !defined(AO_HAVE_int_and_release)
337# define AO_int_and_release(addr, val) \
338 AO_and_release((volatile AO_t *)(addr), (AO_t)(val))
339# define AO_HAVE_int_and_release
342#if defined(AO_HAVE_or_release) && !defined(AO_HAVE_int_or_release)
343# define AO_int_or_release(addr, val) \
344 AO_or_release((volatile AO_t *)(addr), (AO_t)(val))
345# define AO_HAVE_int_or_release
348#if defined(AO_HAVE_xor_release) && !defined(AO_HAVE_int_xor_release)
349# define AO_int_xor_release(addr, val) \
350 AO_xor_release((volatile AO_t *)(addr), (AO_t)(val))
351# define AO_HAVE_int_xor_release
354#if defined(AO_HAVE_fetch_compare_and_swap_release) \
355 && !defined(AO_HAVE_int_fetch_compare_and_swap_release)
356# define AO_int_fetch_compare_and_swap_release(addr, old, new_val) \
357 (unsigned)AO_fetch_compare_and_swap_release((volatile AO_t *)(addr), \
358 (AO_t)(old), (AO_t)(new_val))
359# define AO_HAVE_int_fetch_compare_and_swap_release
362#if defined(AO_HAVE_compare_and_swap_release) \
363 && !defined(AO_HAVE_int_compare_and_swap_release)
364# define AO_int_compare_and_swap_release(addr, old, new_val) \
365 AO_compare_and_swap_release((volatile AO_t *)(addr), \
366 (AO_t)(old), (AO_t)(new_val))
367# define AO_HAVE_int_compare_and_swap_release
394#if defined(AO_HAVE_load_write) && !defined(AO_HAVE_int_load_write)
395# define AO_int_load_write(addr) \
396 (unsigned)AO_load_write((const volatile AO_t *)(addr))
397# define AO_HAVE_int_load_write
400#if defined(AO_HAVE_store_write) && !defined(AO_HAVE_int_store_write)
401# define AO_int_store_write(addr, val) \
402 AO_store_write((volatile AO_t *)(addr), (AO_t)(val))
403# define AO_HAVE_int_store_write
406#if defined(AO_HAVE_fetch_and_add_write) \
407 && !defined(AO_HAVE_int_fetch_and_add_write)
408# define AO_int_fetch_and_add_write(addr, incr) \
409 (unsigned)AO_fetch_and_add_write((volatile AO_t *)(addr), \
411# define AO_HAVE_int_fetch_and_add_write
414#if defined(AO_HAVE_fetch_and_add1_write) \
415 && !defined(AO_HAVE_int_fetch_and_add1_write)
416# define AO_int_fetch_and_add1_write(addr) \
417 (unsigned)AO_fetch_and_add1_write((volatile AO_t *)(addr))
418# define AO_HAVE_int_fetch_and_add1_write
421#if defined(AO_HAVE_fetch_and_sub1_write) \
422 && !defined(AO_HAVE_int_fetch_and_sub1_write)
423# define AO_int_fetch_and_sub1_write(addr) \
424 (unsigned)AO_fetch_and_sub1_write((volatile AO_t *)(addr))
425# define AO_HAVE_int_fetch_and_sub1_write
428#if defined(AO_HAVE_and_write) && !defined(AO_HAVE_int_and_write)
429# define AO_int_and_write(addr, val) \
430 AO_and_write((volatile AO_t *)(addr), (AO_t)(val))
431# define AO_HAVE_int_and_write
434#if defined(AO_HAVE_or_write) && !defined(AO_HAVE_int_or_write)
435# define AO_int_or_write(addr, val) \
436 AO_or_write((volatile AO_t *)(addr), (AO_t)(val))
437# define AO_HAVE_int_or_write
440#if defined(AO_HAVE_xor_write) && !defined(AO_HAVE_int_xor_write)
441# define AO_int_xor_write(addr, val) \
442 AO_xor_write((volatile AO_t *)(addr), (AO_t)(val))
443# define AO_HAVE_int_xor_write
446#if defined(AO_HAVE_fetch_compare_and_swap_write) \
447 && !defined(AO_HAVE_int_fetch_compare_and_swap_write)
448# define AO_int_fetch_compare_and_swap_write(addr, old, new_val) \
449 (unsigned)AO_fetch_compare_and_swap_write((volatile AO_t *)(addr), \
450 (AO_t)(old), (AO_t)(new_val))
451# define AO_HAVE_int_fetch_compare_and_swap_write
454#if defined(AO_HAVE_compare_and_swap_write) \
455 && !defined(AO_HAVE_int_compare_and_swap_write)
456# define AO_int_compare_and_swap_write(addr, old, new_val) \
457 AO_compare_and_swap_write((volatile AO_t *)(addr), \
458 (AO_t)(old), (AO_t)(new_val))
459# define AO_HAVE_int_compare_and_swap_write
486#if defined(AO_HAVE_load_read) && !defined(AO_HAVE_int_load_read)
487# define AO_int_load_read(addr) \
488 (unsigned)AO_load_read((const volatile AO_t *)(addr))
489# define AO_HAVE_int_load_read
492#if defined(AO_HAVE_store_read) && !defined(AO_HAVE_int_store_read)
493# define AO_int_store_read(addr, val) \
494 AO_store_read((volatile AO_t *)(addr), (AO_t)(val))
495# define AO_HAVE_int_store_read
498#if defined(AO_HAVE_fetch_and_add_read) \
499 && !defined(AO_HAVE_int_fetch_and_add_read)
500# define AO_int_fetch_and_add_read(addr, incr) \
501 (unsigned)AO_fetch_and_add_read((volatile AO_t *)(addr), \
503# define AO_HAVE_int_fetch_and_add_read
506#if defined(AO_HAVE_fetch_and_add1_read) \
507 && !defined(AO_HAVE_int_fetch_and_add1_read)
508# define AO_int_fetch_and_add1_read(addr) \
509 (unsigned)AO_fetch_and_add1_read((volatile AO_t *)(addr))
510# define AO_HAVE_int_fetch_and_add1_read
513#if defined(AO_HAVE_fetch_and_sub1_read) \
514 && !defined(AO_HAVE_int_fetch_and_sub1_read)
515# define AO_int_fetch_and_sub1_read(addr) \
516 (unsigned)AO_fetch_and_sub1_read((volatile AO_t *)(addr))
517# define AO_HAVE_int_fetch_and_sub1_read
520#if defined(AO_HAVE_and_read) && !defined(AO_HAVE_int_and_read)
521# define AO_int_and_read(addr, val) \
522 AO_and_read((volatile AO_t *)(addr), (AO_t)(val))
523# define AO_HAVE_int_and_read
526#if defined(AO_HAVE_or_read) && !defined(AO_HAVE_int_or_read)
527# define AO_int_or_read(addr, val) \
528 AO_or_read((volatile AO_t *)(addr), (AO_t)(val))
529# define AO_HAVE_int_or_read
532#if defined(AO_HAVE_xor_read) && !defined(AO_HAVE_int_xor_read)
533# define AO_int_xor_read(addr, val) \
534 AO_xor_read((volatile AO_t *)(addr), (AO_t)(val))
535# define AO_HAVE_int_xor_read
538#if defined(AO_HAVE_fetch_compare_and_swap_read) \
539 && !defined(AO_HAVE_int_fetch_compare_and_swap_read)
540# define AO_int_fetch_compare_and_swap_read(addr, old, new_val) \
541 (unsigned)AO_fetch_compare_and_swap_read((volatile AO_t *)(addr), \
542 (AO_t)(old), (AO_t)(new_val))
543# define AO_HAVE_int_fetch_compare_and_swap_read
546#if defined(AO_HAVE_compare_and_swap_read) \
547 && !defined(AO_HAVE_int_compare_and_swap_read)
548# define AO_int_compare_and_swap_read(addr, old, new_val) \
549 AO_compare_and_swap_read((volatile AO_t *)(addr), \
550 (AO_t)(old), (AO_t)(new_val))
551# define AO_HAVE_int_compare_and_swap_read