xref: /illumos-gate/usr/src/cmd/ast/libast/sparc/FEATURE/aso (revision 9e3493cb8a0cfe96c9aef9b7da42c6c9b5c24b43)
1/* : : generated from contrib/ast/src/lib/libast/features/aso by iffe version 2012-07-17 : : */
2#ifndef _def_aso_ast
3#define _def_aso_ast	1
4#define _sys_types	1	/* #include <sys/types.h> ok */
5/* <atomic.h> atomic_cas_64 */
6#include <atomic.h>
7#define _aso_cas8(p,o,n)	atomic_cas_8(p,o,n)
8#define _aso_inc8(p)		(atomic_add_8_nv(p,1)-1)
9#define _aso_dec8(p)		(atomic_add_8_nv(p,-1)+1)
10#define _aso_cas16(p,o,n)	atomic_cas_16(p,o,n)
11#define _aso_inc16(p)		(atomic_add_16_nv(p,1)-1)
12#define _aso_dec16(p)		(atomic_add_16_nv(p,-1)+1)
13#define _aso_cas32(p,o,n)	atomic_cas_32(p,o,n)
14#define _aso_inc32(p)		(atomic_add_32_nv(p,1)-1)
15#define _aso_dec32(p)		(atomic_add_32_nv(p,-1)+1)
16#define _aso_cas64(p,o,n)	atomic_cas_64(p,o,n)
17#define _aso_inc64(p)		(atomic_add_64_nv(p,1)-1)
18#define _aso_dec64(p)		(atomic_add_64_nv(p,-1)+1)
19#if _ast_sizeof_pointer == 8
20#define _aso_casptr(p,o,n)	((void*)atomic_cas_64((uint64_t*)p,(uint64_t)o,(uint64_t)n))
21#else
22#define _aso_casptr(p,o,n)	((void*)atomic_cas_32((uint32_t*)p,(uint32_t)o,(uint32_t)n))
23#endif
24
25#endif
26