Changeset 3217
- Timestamp:
- 10/01/08 19:02:02 (18 months ago)
- Location:
- mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis
- Files:
-
- 3 modified
-
include/mpid_nem_datatypes.h (modified) (6 diffs)
-
include/mpid_nem_defs.h (modified) (1 diff)
-
src/mpid_nem_init.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_datatypes.h
r2927 r3217 101 101 */ 102 102 103 #define MPID_NEM_CELL_HEAD_LEN sizeof(double)103 #define MPID_NEM_CELL_HEAD_LEN 8 /* We use this to keep elements 64-bit aligned */ 104 104 #define MPID_NEM_CELL_PAYLOAD_LEN (MPID_NEM_CELL_LEN - MPID_NEM_CELL_HEAD_LEN) 105 105 … … 166 166 * convert between relative and absolute pointers. */ 167 167 168 /* This should always be exactly the size of a pointer */ 168 169 typedef struct MPID_nem_cell_rel_ptr 169 170 { … … 181 182 { 182 183 MPID_nem_cell_rel_ptr_t next; 184 #if MPID_NEM_CELL_HEAD_LEN != SIZEOF_VOID_P 183 185 char padding[MPID_NEM_CELL_HEAD_LEN - sizeof(MPID_nem_cell_rel_ptr_t)]; 186 #endif 184 187 MPID_nem_pkt_t pkt; 185 188 } MPID_nem_cell_t; … … 189 192 { 190 193 struct MPID_nem_abs_cell *next; 194 #if MPID_NEM_CELL_HEAD_LEN != SIZEOF_VOID_P 191 195 char padding[MPID_NEM_CELL_HEAD_LEN - sizeof(struct MPID_nem_abs_cell*)]; 196 #endif 192 197 volatile MPID_nem_pkt_t pkt; 193 198 } MPID_nem_abs_cell_t; … … 214 219 volatile MPID_nem_cell_rel_ptr_t head; 215 220 volatile MPID_nem_cell_rel_ptr_t tail; 221 #if MPID_NEM_CACHE_LINE_LEN != (2 * SIZEOF_VOID_P) 216 222 char padding1[MPID_NEM_CACHE_LINE_LEN - 2 * sizeof(MPID_nem_cell_rel_ptr_t)]; 223 #endif 217 224 MPID_nem_cell_rel_ptr_t my_head; 225 #if MPID_NEM_CACHE_LINE_LEN != SIZEOF_VOID_P 218 226 char padding2[MPID_NEM_CACHE_LINE_LEN - sizeof(MPID_nem_cell_rel_ptr_t)]; 227 #endif 219 228 } MPID_nem_queue_t, *MPID_nem_queue_ptr_t; 220 229 … … 223 232 { 224 233 volatile int value; 234 #if MPID_NEM_CACHE_LINE_LEN != 0 225 235 char padding[MPID_NEM_CACHE_LINE_LEN]; 236 #endif 226 237 } 227 238 MPID_nem_opt_volint_t; -
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/include/mpid_nem_defs.h
r3189 r3217 97 97 volatile int usage_cnt; 98 98 volatile int cnt; 99 #if MPID_NEM_CACHE_LINE_LEN != SIZEOF_INT 99 100 char padding0[MPID_NEM_CACHE_LINE_LEN - sizeof(int)]; 101 #endif 100 102 volatile int sig0; 101 103 volatile int sig; -
mpich2/trunk/src/mpid/ch3/channels/nemesis/nemesis/src/mpid_nem_init.c
r3189 r3217 74 74 MPIU_Assert(sizeof(MPIDI_CH3_nem_pkt_t) <= sizeof(MPIDI_CH3_PktGeneric_t)); 75 75 76 /* The MPID_nem_cell_rel_ptr_t defined in mpid_nem_datatypes.h 77 * should only contain a pointer. Also, we don't support compilers 78 * which add random padding to the start of the structure. The 79 * below assert should blow up if any of these happens. */ 80 MPIU_Assert(sizeof(MPID_nem_cell_rel_ptr_t) == SIZEOF_VOID_P); 81 76 82 /* Make sure the cell structure looks like it should */ 77 83 MPIU_Assert(MPID_NEM_CELL_PAYLOAD_LEN + MPID_NEM_CELL_HEAD_LEN == sizeof(MPID_nem_cell_t));
