119
120 uint_t rdsv3_one_sec_in_hz;
121
122 #define jiffies 100
123 #define HZ (drv_hztousec(1))
124 /* setting this to PAGESIZE throws build errors */
125 #define PAGE_SIZE 4096 /* xxx - fix this */
126 #define BITS_PER_LONG (sizeof (unsigned long) * 8)
127
128 /* debug */
129 #define RDSV3_PANIC() cmn_err(CE_PANIC, "Panic forced by RDSV3");
130
131 /* ERR */
132 #define MAX_ERRNO 4095
133 #define ERR_PTR(x) ((void *)(uintptr_t)x)
134 #define IS_ERR(ptr) (((uintptr_t)ptr) >= (uintptr_t)-MAX_ERRNO)
135 #define PTR_ERR(ptr) (int)(uintptr_t)ptr
136
137 #define MAX_SCHEDULE_TIMEOUT (~0UL>>1)
138
139 #define RDMA_CM_EVENT_ADDR_CHANGE 14
140
141 /* list */
142 /* copied and modified list_remove_node */
143 #define list_remove_node(node) \
144 if ((node)->list_next != NULL) { \
145 (node)->list_prev->list_next = (node)->list_next; \
146 (node)->list_next->list_prev = (node)->list_prev; \
147 (node)->list_next = (node)->list_prev = NULL; \
148 }
149
150 #define list_splice(src, dst) { \
151 list_create(dst, (src)->list_size, (src)->list_offset); \
152 list_move_tail(dst, src); \
153 }
154
155 #define RDSV3_FOR_EACH_LIST_NODE(objp, listp, member) \
156 for (objp = list_head(listp); objp; objp = list_next(listp, objp))
157 #define RDSV3_FOR_EACH_LIST_NODE_SAFE(objp, tmp, listp, member) \
158 for (objp = list_head(listp), tmp = (objp != NULL) ? \
159 list_next(listp, objp) : NULL; \
160 objp; \
|
119
120 uint_t rdsv3_one_sec_in_hz;
121
122 #define jiffies 100
123 #define HZ (drv_hztousec(1))
124 /* setting this to PAGESIZE throws build errors */
125 #define PAGE_SIZE 4096 /* xxx - fix this */
126 #define BITS_PER_LONG (sizeof (unsigned long) * 8)
127
128 /* debug */
129 #define RDSV3_PANIC() cmn_err(CE_PANIC, "Panic forced by RDSV3");
130
131 /* ERR */
132 #define MAX_ERRNO 4095
133 #define ERR_PTR(x) ((void *)(uintptr_t)x)
134 #define IS_ERR(ptr) (((uintptr_t)ptr) >= (uintptr_t)-MAX_ERRNO)
135 #define PTR_ERR(ptr) (int)(uintptr_t)ptr
136
137 #define MAX_SCHEDULE_TIMEOUT (~0UL>>1)
138
139 /* list */
140 /* copied and modified list_remove_node */
141 #define list_remove_node(node) \
142 if ((node)->list_next != NULL) { \
143 (node)->list_prev->list_next = (node)->list_next; \
144 (node)->list_next->list_prev = (node)->list_prev; \
145 (node)->list_next = (node)->list_prev = NULL; \
146 }
147
148 #define list_splice(src, dst) { \
149 list_create(dst, (src)->list_size, (src)->list_offset); \
150 list_move_tail(dst, src); \
151 }
152
153 #define RDSV3_FOR_EACH_LIST_NODE(objp, listp, member) \
154 for (objp = list_head(listp); objp; objp = list_next(listp, objp))
155 #define RDSV3_FOR_EACH_LIST_NODE_SAFE(objp, tmp, listp, member) \
156 for (objp = list_head(listp), tmp = (objp != NULL) ? \
157 list_next(listp, objp) : NULL; \
158 objp; \
|