diff options
author | Igor Sysoev <igor@sysoev.ru> | 2002-09-02 14:48:24 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2002-09-02 14:48:24 +0000 |
commit | a58e3ca14300fce97b2124233afe140c8d59199f (patch) | |
tree | d24eff379cc7dfb5c6952f1bb15735cd63ba2179 /src/core/ngx_hunk.h | |
parent | 016b85270268989d769bade2004a7c628a47d726 (diff) | |
download | nginx-a58e3ca14300fce97b2124233afe140c8d59199f.tar.gz nginx-a58e3ca14300fce97b2124233afe140c8d59199f.zip |
nginx-0.0.1-2002-09-02-18:48:24 import
Diffstat (limited to 'src/core/ngx_hunk.h')
-rw-r--r-- | src/core/ngx_hunk.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/ngx_hunk.h b/src/core/ngx_hunk.h index 3703db456..75aaef132 100644 --- a/src/core/ngx_hunk.h +++ b/src/core/ngx_hunk.h @@ -27,6 +27,8 @@ /* can be used with NGX_HUNK_LAST only */ #define NGX_HUNK_SHUTDOWN 0x0400 +#define NGX_HUNK_RECYCLED 0x0800 + #define NGX_HUNK_IN_MEMORY (NGX_HUNK_TEMP|NGX_HUNK_MEMORY|NGX_HUNK_MMAP) @@ -48,7 +50,7 @@ struct ngx_hunk_s { char *pre_start; /* start of pre-allocated hunk */ char *post_end; /* end of post-allocated hunk */ int tag; - ngx_fd_t fd; + ngx_file_t *file; }; typedef struct ngx_chain_s ngx_chain_t; @@ -57,8 +59,11 @@ struct ngx_chain_s { ngx_chain_t *next; }; -#define ngx_create_temp_hunk(pool, size, before, after) \ - ngx_get_hunk(pool, size, before, after) + +ngx_hunk_t *ngx_create_temp_hunk(ngx_pool_t *pool, int size, + int before, int after); + +#define ngx_create_chain_entry(pool) ngx_palloc(pool, sizeof(ngx_chain_t)) #define ngx_add_hunk_to_chain(chain, h, pool, error) \ do { \ @@ -70,7 +75,6 @@ struct ngx_chain_s { -ngx_hunk_t *ngx_get_hunk(ngx_pool_t *pool, int size, int before, int after); #endif /* _NGX_CHUNK_H_INCLUDED_ */ |