comparison src/core/ngx_buf.h @ 507:cd3117ad9aab release-0.1.28

nginx-0.1.28-RELEASE import *) Bugfix: nginx hogs CPU while proxying the huge files. *) Bugfix: nginx could not be built by gcc 4.0 on Linux.
author Igor Sysoev <igor@sysoev.ru>
date Fri, 08 Apr 2005 15:18:55 +0000
parents d4ea69372b94
children 9b8c906f6e63
comparison
equal deleted inserted replaced
506:005e65646622 507:cd3117ad9aab
52 unsigned zerocopy_busy:1; 52 unsigned zerocopy_busy:1;
53 53
54 /* STUB */ int num; 54 /* STUB */ int num;
55 }; 55 };
56 56
57
58 typedef struct ngx_chain_s ngx_chain_t;
59 57
60 struct ngx_chain_s { 58 struct ngx_chain_s {
61 ngx_buf_t *buf; 59 ngx_buf_t *buf;
62 ngx_chain_t *next; 60 ngx_chain_t *next;
63 }; 61 };
117 115
118 116
119 #define ngx_alloc_buf(pool) ngx_palloc(pool, sizeof(ngx_buf_t)) 117 #define ngx_alloc_buf(pool) ngx_palloc(pool, sizeof(ngx_buf_t))
120 #define ngx_calloc_buf(pool) ngx_pcalloc(pool, sizeof(ngx_buf_t)) 118 #define ngx_calloc_buf(pool) ngx_pcalloc(pool, sizeof(ngx_buf_t))
121 119
122 #define ngx_alloc_chain_link(pool) ngx_palloc(pool, sizeof(ngx_chain_t)) 120 ngx_chain_t *ngx_alloc_chain_link(ngx_pool_t *pool);
121 #define ngx_free_chain(pool, cl) \
122 cl->next = pool->chain; \
123 pool->chain = cl
124
123 125
124 126
125 ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in); 127 ngx_int_t ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in);
126 ngx_int_t ngx_chain_writer(void *ctx, ngx_chain_t *in); 128 ngx_int_t ngx_chain_writer(void *ctx, ngx_chain_t *in);
127 129