comparison src/core/ngx_queue.h @ 348:e10168d6e371 NGINX_0_6_18

nginx 0.6.18 *) Change: now the ngx_http_userid_module adds start time microseconds to the cookie field contains a pid value. *) Change: now the full request line instead of URI only is written to error_log. *) Feature: variables support in the "proxy_pass" directive. *) Feature: the "resolver" and "resolver_timeout" directives. *) Feature: now the directive "add_header last-modified ''" deletes a "Last-Modified" response header line. *) Bugfix: the "limit_rate" directive did not allow to use full throughput, even if limit value was very high.
author Igor Sysoev <http://sysoev.ru>
date Tue, 27 Nov 2007 00:00:00 +0300
parents
children 583decdb82a4
comparison
equal deleted inserted replaced
347:d53199b68e17 348:e10168d6e371
1
2 /*
3 * Copyright (C) Igor Sysoev
4 */
5
6
7 #include <ngx_config.h>
8 #include <ngx_core.h>
9
10
11 #ifndef _NGX_QUEUE_H_INCLUDED_
12 #define _NGX_QUEUE_H_INCLUDED_
13
14
15 typedef struct ngx_queue_s ngx_queue_t;
16
17 struct ngx_queue_s {
18 ngx_queue_t *prev;
19 ngx_queue_t *next;
20 };
21
22
23 #define ngx_queue_empty(h) \
24 (h == (h)->prev)
25
26
27 #define ngx_queue_insert_head(h, x) \
28 (x)->next = (h)->next; \
29 (x)->next->prev = x; \
30 (x)->prev = h; \
31 (h)->next = x
32
33
34 #define ngx_queue_head(h) \
35 (h)->next
36
37
38 #define ngx_queue_last(h) \
39 (h)->prev
40
41
42 #if (NGX_DEBUG)
43
44 #define ngx_queue_remove(x) \
45 (x)->next->prev = (x)->prev; \
46 (x)->prev->next = (x)->next; \
47 (x)->prev = NULL; \
48 (x)->next = NULL
49
50 #else
51
52 #define ngx_queue_remove(x) \
53 (x)->next->prev = (x)->prev; \
54 (x)->prev->next = (x)->next
55
56 #endif
57
58
59 #define ngx_queue_data(q, type, link) \
60 (type *) ((u_char *) q - offsetof(type, link))
61
62
63 #endif /* _NGX_QUEUE_H_INCLUDED_ */