00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #if defined(KEYBASED)
00020 INLINE void * stm_read_key_ptr(void * volatile * addr, void * key, void * mydesc) {
00021 desc_t * my = (desc_t *)mydesc;
00022 #else
00023 INLINE void * stm_read_ptr(void * volatile * addr, void * mydesc) {
00024 desc_t * my = (desc_t *) mydesc;
00025 void * key = (void *)addr;
00026 #endif
00027 void * val;
00028 void * a = (void *) addr;
00029 stm_read_any(my,a,key,&val,sizeof(val));
00030 return val;
00031 }
00032
00033 #ifdef KEYBASED
00034 INLINE void stm_write_key_ptr(void * volatile * addr, void * key, void * val, void * mydesc) {
00035 desc_t * my = (desc_t *)mydesc;
00036 #else
00037 INLINE void stm_write_ptr(void * volatile * addr, void * val, void * mydesc) {
00038 desc_t * my = (desc_t *)mydesc;
00039 void * key = (void *)addr;
00040 #endif
00041 void * a = (void *) addr;
00042 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00043 }
00044
00045 #if defined(KEYBASED)
00046 INLINE float stm_read_key_float(float volatile * addr, void * key, void * mydesc) {
00047 desc_t * my = (desc_t *)mydesc;
00048 #else
00049 INLINE float stm_read_float(float volatile * addr, void * mydesc) {
00050 desc_t * my = (desc_t *) mydesc;
00051 void * key = (void *)addr;
00052 #endif
00053 float val;
00054 void * a = (void *) addr;
00055 stm_read_any(my,a,key,&val,sizeof(val));
00056 return val;
00057 }
00058
00059 #ifdef KEYBASED
00060 INLINE void stm_write_key_float(float volatile * addr, void * key, float val, void * mydesc) {
00061 desc_t * my = (desc_t *)mydesc;
00062 #else
00063 INLINE void stm_write_float(float volatile * addr, float val, void * mydesc) {
00064 desc_t * my = (desc_t *)mydesc;
00065 void * key = (void *)addr;
00066 #endif
00067 void * a = (void *) addr;
00068 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00069 }
00070
00071 #if defined(KEYBASED)
00072 INLINE double stm_read_key_double(double volatile * addr, void * key, void * mydesc) {
00073 desc_t * my = (desc_t *)mydesc;
00074 #else
00075 INLINE double stm_read_double(double volatile * addr, void * mydesc) {
00076 desc_t * my = (desc_t *) mydesc;
00077 void * key = (void *)addr;
00078 #endif
00079 double val;
00080 void * a = (void *) addr;
00081 stm_read_any(my,a,key,&val,sizeof(val));
00082 return val;
00083 }
00084
00085 #ifdef KEYBASED
00086 INLINE void stm_write_key_double(double volatile * addr, void * key, double val, void * mydesc) {
00087 desc_t * my = (desc_t *)mydesc;
00088 #else
00089 INLINE void stm_write_double(double volatile * addr, double val, void * mydesc) {
00090 desc_t * my = (desc_t *)mydesc;
00091 void * key = (void *)addr;
00092 #endif
00093 void * a = (void *) addr;
00094 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00095 }
00096
00097 #if defined(KEYBASED)
00098 INLINE char stm_read_key_char(char volatile * addr, void * key, void * mydesc) {
00099 desc_t * my = (desc_t *)mydesc;
00100 #else
00101 INLINE char stm_read_char(char volatile * addr, void * mydesc) {
00102 desc_t * my = (desc_t *) mydesc;
00103 void * key = (void *)addr;
00104 #endif
00105 char val;
00106 void * a = (void *) addr;
00107 stm_read_any(my,a,key,&val,sizeof(val));
00108 return val;
00109 }
00110
00111 #ifdef KEYBASED
00112 INLINE void stm_write_key_char(char volatile * addr, void * key, char val, void * mydesc) {
00113 desc_t * my = (desc_t *)mydesc;
00114 #else
00115 INLINE void stm_write_char(char volatile * addr, char val, void * mydesc) {
00116 desc_t * my = (desc_t *)mydesc;
00117 void * key = (void *)addr;
00118 #endif
00119 void * a = (void *) addr;
00120 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00121 }
00122
00123 #if defined(KEYBASED)
00124 INLINE short stm_read_key_short(short volatile * addr, void * key, void * mydesc) {
00125 desc_t * my = (desc_t *)mydesc;
00126 #else
00127 INLINE short stm_read_short(short volatile * addr, void * mydesc) {
00128 desc_t * my = (desc_t *) mydesc;
00129 void * key = (void *)addr;
00130 #endif
00131 short val;
00132 void * a = (void *) addr;
00133 stm_read_any(my,a,key,&val,sizeof(val));
00134 return val;
00135 }
00136
00137 #ifdef KEYBASED
00138 INLINE void stm_write_key_short(short volatile * addr, void * key, short val, void * mydesc) {
00139 desc_t * my = (desc_t *)mydesc;
00140 #else
00141 INLINE void stm_write_short(short volatile * addr, short val, void * mydesc) {
00142 desc_t * my = (desc_t *)mydesc;
00143 void * key = (void *)addr;
00144 #endif
00145 void * a = (void *) addr;
00146 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00147 }
00148
00149 #if defined(KEYBASED)
00150 INLINE int stm_read_key_int(int volatile * addr, void * key, void * mydesc) {
00151 desc_t * my = (desc_t *)mydesc;
00152 #else
00153 INLINE int stm_read_int(int volatile * addr, void * mydesc) {
00154 desc_t * my = (desc_t *) mydesc;
00155 void * key = (void *)addr;
00156 #endif
00157 int val;
00158 void * a = (void *) addr;
00159 stm_read_any(my,a,key,&val,sizeof(val));
00160 return val;
00161 }
00162
00163 #ifdef KEYBASED
00164 INLINE void stm_write_key_int(int volatile * addr, void * key, int val, void * mydesc) {
00165 desc_t * my = (desc_t *)mydesc;
00166 #else
00167 INLINE void stm_write_int(int volatile * addr, int val, void * mydesc) {
00168 desc_t * my = (desc_t *)mydesc;
00169 void * key = (void *)addr;
00170 #endif
00171 void * a = (void *) addr;
00172 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00173 }
00174
00175 #if defined(KEYBASED)
00176 INLINE long stm_read_key_long(long volatile * addr, void * key, void * mydesc) {
00177 desc_t * my = (desc_t *)mydesc;
00178 #else
00179 INLINE long stm_read_long(long volatile * addr, void * mydesc) {
00180 desc_t * my = (desc_t *) mydesc;
00181 void * key = (void *)addr;
00182 #endif
00183 long val;
00184 void * a = (void *) addr;
00185 stm_read_any(my,a,key,&val,sizeof(val));
00186 return val;
00187 }
00188
00189 #ifdef KEYBASED
00190 INLINE void stm_write_key_long(long volatile * addr, void * key, long val, void * mydesc) {
00191 desc_t * my = (desc_t *)mydesc;
00192 #else
00193 INLINE void stm_write_long(long volatile * addr, long val, void * mydesc) {
00194 desc_t * my = (desc_t *)mydesc;
00195 void * key = (void *)addr;
00196 #endif
00197 void * a = (void *) addr;
00198 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00199 }
00200
00201 #if defined(KEYBASED)
00202 INLINE long long stm_read_key_ll(long long volatile * addr, void * key, void * mydesc) {
00203 desc_t * my = (desc_t *)mydesc;
00204 #else
00205 INLINE long long stm_read_ll(long long volatile * addr, void * mydesc) {
00206 desc_t * my = (desc_t *) mydesc;
00207 void * key = (void *)addr;
00208 #endif
00209 long long val;
00210 void * a = (void *) addr;
00211 stm_read_any(my,a,key,&val,sizeof(val));
00212 return val;
00213 }
00214
00215 #ifdef KEYBASED
00216 INLINE void stm_write_key_ll(long long volatile * addr, void * key, long long val, void * mydesc) {
00217 desc_t * my = (desc_t *)mydesc;
00218 #else
00219 INLINE void stm_write_ll(long long volatile * addr, long long val, void * mydesc) {
00220 desc_t * my = (desc_t *)mydesc;
00221 void * key = (void *)addr;
00222 #endif
00223 void * a = (void *) addr;
00224 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00225 }
00226
00227 #if defined(KEYBASED)
00228 INLINE unsigned char stm_read_key_uchar(unsigned char volatile * addr, void * key, void * mydesc) {
00229 desc_t * my = (desc_t *)mydesc;
00230 #else
00231 INLINE unsigned char stm_read_uchar(unsigned char volatile * addr, void * mydesc) {
00232 desc_t * my = (desc_t *) mydesc;
00233 void * key = (void *)addr;
00234 #endif
00235 unsigned char val;
00236 void * a = (void *) addr;
00237 stm_read_any(my,a,key,&val,sizeof(val));
00238 return val;
00239 }
00240
00241 #ifdef KEYBASED
00242 INLINE void stm_write_key_uchar(unsigned char volatile * addr, void * key, unsigned char val, void * mydesc) {
00243 desc_t * my = (desc_t *)mydesc;
00244 #else
00245 INLINE void stm_write_uchar(unsigned char volatile * addr, unsigned char val, void * mydesc) {
00246 desc_t * my = (desc_t *)mydesc;
00247 void * key = (void *)addr;
00248 #endif
00249 void * a = (void *) addr;
00250 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00251 }
00252
00253 #if defined(KEYBASED)
00254 INLINE unsigned short stm_read_key_ushort(unsigned short volatile * addr, void * key, void * mydesc) {
00255 desc_t * my = (desc_t *)mydesc;
00256 #else
00257 INLINE unsigned short stm_read_ushort(unsigned short volatile * addr, void * mydesc) {
00258 desc_t * my = (desc_t *) mydesc;
00259 void * key = (void *)addr;
00260 #endif
00261 unsigned short val;
00262 void * a = (void *) addr;
00263 stm_read_any(my,a,key,&val,sizeof(val));
00264 return val;
00265 }
00266
00267 #ifdef KEYBASED
00268 INLINE void stm_write_key_ushort(unsigned short volatile * addr, void * key, unsigned short val, void * mydesc) {
00269 desc_t * my = (desc_t *)mydesc;
00270 #else
00271 INLINE void stm_write_ushort(unsigned short volatile * addr, unsigned short val, void * mydesc) {
00272 desc_t * my = (desc_t *)mydesc;
00273 void * key = (void *)addr;
00274 #endif
00275 void * a = (void *) addr;
00276 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00277 }
00278
00279 #if defined(KEYBASED)
00280 INLINE unsigned int stm_read_key_uint(unsigned int volatile * addr, void * key, void * mydesc) {
00281 desc_t * my = (desc_t *)mydesc;
00282 #else
00283 INLINE unsigned int stm_read_uint(unsigned int volatile * addr, void * mydesc) {
00284 desc_t * my = (desc_t *) mydesc;
00285 void * key = (void *)addr;
00286 #endif
00287 unsigned int val;
00288 void * a = (void *) addr;
00289 stm_read_any(my,a,key,&val,sizeof(val));
00290 return val;
00291 }
00292
00293 #ifdef KEYBASED
00294 INLINE void stm_write_key_uint(unsigned int volatile * addr, void * key, unsigned int val, void * mydesc) {
00295 desc_t * my = (desc_t *)mydesc;
00296 #else
00297 INLINE void stm_write_uint(unsigned int volatile * addr, unsigned int val, void * mydesc) {
00298 desc_t * my = (desc_t *)mydesc;
00299 void * key = (void *)addr;
00300 #endif
00301 void * a = (void *) addr;
00302 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00303 }
00304
00305 #if defined(KEYBASED)
00306 INLINE unsigned long stm_read_key_ulong(unsigned long volatile * addr, void * key, void * mydesc) {
00307 desc_t * my = (desc_t *)mydesc;
00308 #else
00309 INLINE unsigned long stm_read_ulong(unsigned long volatile * addr, void * mydesc) {
00310 desc_t * my = (desc_t *) mydesc;
00311 void * key = (void *)addr;
00312 #endif
00313 unsigned long val;
00314 void * a = (void *) addr;
00315 stm_read_any(my,a,key,&val,sizeof(val));
00316 return val;
00317 }
00318
00319 #ifdef KEYBASED
00320 INLINE void stm_write_key_ulong(unsigned long volatile * addr, void * key, unsigned long val, void * mydesc) {
00321 desc_t * my = (desc_t *)mydesc;
00322 #else
00323 INLINE void stm_write_ulong(unsigned long volatile * addr, unsigned long val, void * mydesc) {
00324 desc_t * my = (desc_t *)mydesc;
00325 void * key = (void *)addr;
00326 #endif
00327 void * a = (void *) addr;
00328 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00329 }
00330
00331 #if defined(KEYBASED)
00332 INLINE unsigned long long stm_read_key_ull(unsigned long long volatile * addr, void * key, void * mydesc) {
00333 desc_t * my = (desc_t *)mydesc;
00334 #else
00335 INLINE unsigned long long stm_read_ull(unsigned long long volatile * addr, void * mydesc) {
00336 desc_t * my = (desc_t *) mydesc;
00337 void * key = (void *)addr;
00338 #endif
00339 unsigned long long val;
00340 void * a = (void *) addr;
00341 stm_read_any(my,a,key,&val,sizeof(val));
00342 return val;
00343 }
00344
00345 #ifdef KEYBASED
00346 INLINE void stm_write_key_ull(unsigned long long volatile * addr, void * key, unsigned long long val, void * mydesc) {
00347 desc_t * my = (desc_t *)mydesc;
00348 #else
00349 INLINE void stm_write_ull(unsigned long long volatile * addr, unsigned long long val, void * mydesc) {
00350 desc_t * my = (desc_t *)mydesc;
00351 void * key = (void *)addr;
00352 #endif
00353 void * a = (void *) addr;
00354 stm_write_any(my,a,key,(void *)&val,sizeof(val)); return;
00355 }
00356