comparison src/core/ngx_queue.h @ 378:820f6378fc00 NGINX_0_7_1

nginx 0.7.1 *) Change: now locations are searched in a tree. *) Change: the "optimize_server_names" directive was canceled due to the "server_name_in_redirect" directive introduction. *) Change: some long deprecated directives are not supported anymore. *) Change: the "none" parameter in the "ssl_session_cache" directive; now this is default parameter. Thanks to Rob Mueller. *) Bugfix: worker processes might not catch reconfiguration and log rotation signals. *) Bugfix: nginx could not be built on latest Fedora 9 Linux. Thanks to Roxis.
author Igor Sysoev <http://sysoev.ru>
date Mon, 26 May 2008 00:00:00 +0400
parents 9121a0a91f47
children
comparison
equal deleted inserted replaced
377:5d98007adb5f 378:820f6378fc00
34 (x)->next->prev = x; \ 34 (x)->next->prev = x; \
35 (x)->prev = h; \ 35 (x)->prev = h; \
36 (h)->next = x 36 (h)->next = x
37 37
38 38
39 #define ngx_queue_insert_after ngx_queue_insert_head
40
41
42 #define ngx_queue_insert_tail(h, x) \
43 (x)->prev = (h)->prev; \
44 (x)->prev->next = x; \
45 (x)->next = h; \
46 (h)->prev = x
47
48
39 #define ngx_queue_head(h) \ 49 #define ngx_queue_head(h) \
40 (h)->next 50 (h)->next
41 51
42 52
43 #define ngx_queue_last(h) \ 53 #define ngx_queue_last(h) \
44 (h)->prev 54 (h)->prev
55
56
57 #define ngx_queue_sentinel(h) \
58 (h)
59
60
61 #define ngx_queue_next(q) \
62 (q)->next
63
64
65 #define ngx_queue_prev(q) \
66 (q)->prev
45 67
46 68
47 #if (NGX_DEBUG) 69 #if (NGX_DEBUG)
48 70
49 #define ngx_queue_remove(x) \ 71 #define ngx_queue_remove(x) \
59 (x)->prev->next = (x)->next 81 (x)->prev->next = (x)->next
60 82
61 #endif 83 #endif
62 84
63 85
86 #define ngx_queue_split(h, q, n) \
87 (n)->prev = (h)->prev; \
88 (n)->prev->next = n; \
89 (n)->next = q; \
90 (h)->prev = (q)->prev; \
91 (h)->prev->next = h; \
92 (q)->prev = n;
93
94
95 #define ngx_queue_add(h, n) \
96 (h)->prev->next = (n)->next; \
97 (n)->next->prev = (h)->prev; \
98 (h)->prev = (n)->prev; \
99 (h)->prev->next = h;
100
101
64 #define ngx_queue_data(q, type, link) \ 102 #define ngx_queue_data(q, type, link) \
65 (type *) ((u_char *) q - offsetof(type, link)) 103 (type *) ((u_char *) q - offsetof(type, link))
66 104
67 105
106 ngx_queue_t *ngx_queue_middle(ngx_queue_t *queue);
107 void ngx_queue_sort(ngx_queue_t *queue,
108 ngx_int_t (*cmp)(const ngx_queue_t *, const ngx_queue_t *));
109
110
68 #endif /* _NGX_QUEUE_H_INCLUDED_ */ 111 #endif /* _NGX_QUEUE_H_INCLUDED_ */