aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_buf.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2005-04-08 15:18:55 +0000
committerIgor Sysoev <igor@sysoev.ru>2005-04-08 15:18:55 +0000
commit02f742b45eb8792053d3880641f45651d645e351 (patch)
tree1d5893bcc89c8f879712aa80f9a98a42f397e2c0 /src/core/ngx_buf.h
parent87ff72436d289ae7b72a23138262e6d156490927 (diff)
downloadnginx-release-0.1.28.tar.gz
nginx-release-0.1.28.zip
nginx-0.1.28-RELEASE importrelease-0.1.28
*) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
Diffstat (limited to 'src/core/ngx_buf.h')
-rw-r--r--src/core/ngx_buf.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/ngx_buf.h b/src/core/ngx_buf.h
index 721b9c2df..96394f9f6 100644
--- a/src/core/ngx_buf.h
+++ b/src/core/ngx_buf.h
@@ -55,8 +55,6 @@ struct ngx_buf_s {
};
-typedef struct ngx_chain_s ngx_chain_t;
-
struct ngx_chain_s {
ngx_buf_t *buf;
ngx_chain_t *next;
@@ -119,7 +117,11 @@ ngx_chain_t *ngx_create_chain_of_bufs(ngx_pool_t *pool, ngx_bufs_t *bufs);
#define ngx_alloc_buf(pool) ngx_palloc(pool, sizeof(ngx_buf_t))
#define ngx_calloc_buf(pool) ngx_pcalloc(pool, sizeof(ngx_buf_t))
-#define ngx_alloc_chain_link(pool) ngx_palloc(pool, sizeof(ngx_chain_t))
+ngx_chain_t *ngx_alloc_chain_link(ngx_pool_t *pool);
+#define ngx_free_chain(pool, cl) \
+ cl->next = pool->chain; \
+ pool->chain = cl
+
ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in);