1 #ifndef __PORTABLE_DEFNS_H__
2 #define __PORTABLE_DEFNS_H__
4 #define MAX_THREADS 128
7 #include "sparc_defns.h"
11 #include "ppc_defns.h"
13 #include "ia64_defns.h"
15 #include "mips_defns.h"
17 #include "alpha_defns.h"
19 #error "A valid architecture has not been defined"
25 #define RMB_NEAR_CAS() RMB()
26 #define WMB_NEAR_CAS() WMB()
27 #define MB_NEAR_CAS() MB()
36 #define ADD_TO(_v,_x) \
38 int __val = (_v), __newval; \
39 while ( (__newval = CASIO(&(_v),__val,__val+(_x))) != __val ) \
47 #define CACHE_PAD(_n) char __pad ## _n [CACHE_LINE_SIZE]
48 #define ALIGNED_ALLOC(_s) \
49 ((void *)(((unsigned long)malloc((_s)+CACHE_LINE_SIZE*2) + \
50 CACHE_LINE_SIZE - 1) & ~(CACHE_LINE_SIZE-1)))
56 #define get_marked_ref(_p) ((void *)(((unsigned long)(_p)) | 1))
57 #define get_unmarked_ref(_p) ((void *)(((unsigned long)(_p)) & ~1))
58 #define is_marked_ref(_p) (((unsigned long)(_p)) & 1)
63 #define READ_FIELD(_x,_f) ((_x) = (_f))
65 #define WEAK_DEP_ORDER_RMB() ((void)0)
66 #define WEAK_DEP_ORDER_WMB() ((void)0)
67 #define WEAK_DEP_ORDER_MB() ((void)0)
int bool_t
Definition: portable_defns.h:32
unsigned long int_addr_t
Definition: portable_defns.h:30