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 #include "read_ordered.h"
00031
00032 AO_INLINE void
00033 AO_nop_write(void)
00034 {
00035 AO_compiler_barrier();
00036
00037
00038 }
00039
00040 #define AO_HAVE_NOP_WRITE
00041
00042 #if defined(AO_HAVE_store)
00043
00044 AO_INLINE void
00045 AO_store_write(volatile AO_t *addr, AO_t val)
00046 {
00047 AO_compiler_barrier();
00048 AO_store(addr, val);
00049 }
00050 # define AO_HAVE_store_write
00051
00052 # define AO_store_release(addr, val) AO_store_write(addr, val)
00053 # define AO_HAVE_store_release
00054
00055 #endif
00056
00057 #if defined(AO_HAVE_char_store)
00058
00059 AO_INLINE void
00060 AO_char_store_write(volatile unsigned char *addr, unsigned char val)
00061 {
00062 AO_compiler_barrier();
00063 AO_char_store(addr, val);
00064 }
00065 # define AO_HAVE_char_store_write
00066
00067 # define AO_char_store_release(addr, val) AO_char_store_write(addr, val)
00068 # define AO_HAVE_char_store_release
00069
00070 #endif
00071
00072 #if defined(AO_HAVE_short_store)
00073
00074 AO_INLINE void
00075 AO_short_store_write(volatile unsigned short *addr, unsigned short val)
00076 {
00077 AO_compiler_barrier();
00078 AO_short_store(addr, val);
00079 }
00080 # define AO_HAVE_short_store_write
00081
00082 # define AO_short_store_release(addr, val) AO_short_store_write(addr, val)
00083 # define AO_HAVE_short_store_release
00084
00085 #endif
00086
00087 #if defined(AO_HAVE_int_store)
00088
00089 AO_INLINE void
00090 AO_int_store_write(volatile unsigned int *addr, unsigned int val)
00091 {
00092 AO_compiler_barrier();
00093 AO_int_store(addr, val);
00094 }
00095 # define AO_HAVE_int_store_write
00096
00097 # define AO_int_store_release(addr, val) AO_int_store_write(addr, val)
00098 # define AO_HAVE_int_store_release
00099
00100 #endif