152 if (node->
prev == 0 && node->
next == 0)
187 #define proclist_delete(list, procno, link_member) \
188 proclist_delete_offset((list), (procno), offsetof(PGPROC, link_member))
189 #define proclist_push_head(list, procno, link_member) \
190 proclist_push_head_offset((list), (procno), offsetof(PGPROC, link_member))
191 #define proclist_push_tail(list, procno, link_member) \
192 proclist_push_tail_offset((list), (procno), offsetof(PGPROC, link_member))
193 #define proclist_pop_head_node(list, link_member) \
194 proclist_pop_head_node_offset((list), offsetof(PGPROC, link_member))
195 #define proclist_contains(list, procno, link_member) \
196 proclist_contains_offset((list), (procno), offsetof(PGPROC, link_member))
206 #define proclist_foreach_modify(iter, lhead, link_member) \
207 for (AssertVariableIsOfTypeMacro(iter, proclist_mutable_iter), \
208 AssertVariableIsOfTypeMacro(lhead, proclist_head *), \
209 (iter).cur = (lhead)->head, \
210 (iter).next = (iter).cur == INVALID_PROC_NUMBER ? INVALID_PROC_NUMBER : \
211 proclist_node_get((iter).cur, \
212 offsetof(PGPROC, link_member))->next; \
213 (iter).cur != INVALID_PROC_NUMBER; \
214 (iter).cur = (iter).next, \
215 (iter).next = (iter).cur == INVALID_PROC_NUMBER ? INVALID_PROC_NUMBER : \
216 proclist_node_get((iter).cur, \
217 offsetof(PGPROC, link_member))->next)
#define Assert(condition)
#define GetPGProcByNumber(n)
static PGPROC * proclist_pop_head_node_offset(proclist_head *list, size_t node_offset)
static bool proclist_contains_offset(const proclist_head *list, int procno, size_t node_offset)
static void proclist_init(proclist_head *list)
static proclist_node * proclist_node_get(int procno, size_t node_offset)
static bool proclist_is_empty(const proclist_head *list)
static void proclist_delete_offset(proclist_head *list, int procno, size_t node_offset)
static void proclist_push_tail_offset(proclist_head *list, int procno, size_t node_offset)
static void proclist_push_head_offset(proclist_head *list, int procno, size_t node_offset)
#define INVALID_PROC_NUMBER