00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #if defined(AO_HAVE_compare_and_swap_full) && \
00032 !defined(AO_HAVE_int_compare_and_swap_full)
00033 # define AO_int_compare_and_swap_full(addr, old, new_val) \
00034 AO_compare_and_swap_full((volatile AO_t *)(addr), \
00035 (AO_t)(old), (AO_t)(new_val))
00036 # define AO_HAVE_int_compare_and_swap_full
00037 # endif
00038
00039 #if defined(AO_HAVE_compare_and_swap_acquire) && \
00040 !defined(AO_HAVE_int_compare_and_swap_acquire)
00041 # define AO_int_compare_and_swap_acquire(addr, old, new_val) \
00042 AO_compare_and_swap_acquire((volatile AO_t *)(addr), \
00043 (AO_t)(old), (AO_t)(new_val))
00044 # define AO_HAVE_int_compare_and_swap_acquire
00045 # endif
00046
00047 #if defined(AO_HAVE_compare_and_swap_release) && \
00048 !defined(AO_HAVE_int_compare_and_swap_release)
00049 # define AO_int_compare_and_swap_release(addr, old, new_val) \
00050 AO_compare_and_swap_release((volatile AO_t *)(addr), \
00051 (AO_t)(old), (AO_t)(new_val))
00052 # define AO_HAVE_int_compare_and_swap_release
00053 # endif
00054
00055 #if defined(AO_HAVE_compare_and_swap_write) && \
00056 !defined(AO_HAVE_int_compare_and_swap_write)
00057 # define AO_int_compare_and_swap_write(addr, old, new_val) \
00058 AO_compare_and_swap_write((volatile AO_t *)(addr), \
00059 (AO_t)(old), (AO_t)(new_val))
00060 # define AO_HAVE_int_compare_and_swap_write
00061 # endif
00062
00063 #if defined(AO_HAVE_compare_and_swap_read) && \
00064 !defined(AO_HAVE_int_compare_and_swap_read)
00065 # define AO_int_compare_and_swap_read(addr, old, new_val) \
00066 AO_compare_and_swap_read((volatile AO_t *)(addr), \
00067 (AO_t)(old), (AO_t)(new_val))
00068 # define AO_HAVE_int_compare_and_swap_read
00069 # endif
00070
00071 #if defined(AO_HAVE_compare_and_swap) && \
00072 !defined(AO_HAVE_int_compare_and_swap)
00073 # define AO_int_compare_and_swap(addr, old, new_val) \
00074 AO_compare_and_swap((volatile AO_t *)(addr), \
00075 (AO_t)(old), (AO_t)(new_val))
00076 # define AO_HAVE_int_compare_and_swap
00077 # endif
00078
00079 #if defined(AO_HAVE_load_acquire) && \
00080 !defined(AO_HAVE_int_load_acquire)
00081 # define AO_int_load_acquire(addr) \
00082 (int)AO_load_acquire((const volatile AO_t *)(addr))
00083 # define AO_HAVE_int_load_acquire
00084 # endif
00085
00086 #if defined(AO_HAVE_store_release) && \
00087 !defined(AO_HAVE_int_store_release)
00088 # define AO_int_store_release(addr, val) \
00089 AO_store_release((volatile AO_t *)(addr), (AO_t)(val))
00090 # define AO_HAVE_int_store_release
00091 # endif
00092
00093 #if defined(AO_HAVE_fetch_and_add_full) && \
00094 !defined(AO_HAVE_int_fetch_and_add_full)
00095 # define AO_int_fetch_and_add_full(addr, incr) \
00096 (int)AO_fetch_and_add_full((volatile AO_t *)(addr), (AO_t)(incr))
00097 # define AO_HAVE_int_fetch_and_add_full
00098 # endif
00099
00100 #if defined(AO_HAVE_fetch_and_add1_acquire) && \
00101 !defined(AO_HAVE_int_fetch_and_add1_acquire)
00102 # define AO_int_fetch_and_add1_acquire(addr) \
00103 (int)AO_fetch_and_add1_acquire((volatile AO_t *)(addr))
00104 # define AO_HAVE_int_fetch_and_add1_acquire
00105 # endif
00106
00107 #if defined(AO_HAVE_fetch_and_add1_release) && \
00108 !defined(AO_HAVE_int_fetch_and_add1_release)
00109 # define AO_int_fetch_and_add1_release(addr) \
00110 (int)AO_fetch_and_add1_release((volatile AO_t *)(addr))
00111 # define AO_HAVE_int_fetch_and_add1_release
00112 # endif
00113
00114 #if defined(AO_HAVE_fetch_and_sub1_acquire) && \
00115 !defined(AO_HAVE_int_fetch_and_sub1_acquire)
00116 # define AO_int_fetch_and_sub1_acquire(addr) \
00117 (int)AO_fetch_and_sub1_acquire((volatile AO_t *)(addr))
00118 # define AO_HAVE_int_fetch_and_sub1_acquire
00119 # endif
00120
00121 #if defined(AO_HAVE_fetch_and_sub1_release) && \
00122 !defined(AO_HAVE_int_fetch_and_sub1_release)
00123 # define AO_int_fetch_and_sub1_release(addr) \
00124 (int)AO_fetch_and_sub1_release((volatile AO_t *)(addr))
00125 # define AO_HAVE_int_fetch_and_sub1_release
00126 # endif