Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Data Structures | Macros | Typedefs | Functions
ngx_buf.h File Reference
#include <ngx_config.h>
#include <ngx_core.h>
Include dependency graph for ngx_buf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ngx_buf_s
struct  ngx_chain_s
struct  ngx_bufs_t
struct  ngx_output_chain_ctx_s
struct  ngx_chain_writer_ctx_t

Macros

#define NGX_CHAIN_ERROR   (ngx_chain_t *) NGX_ERROR
#define ngx_buf_in_memory(b)   (b->temporary || b->memory || b->mmap)
#define ngx_buf_in_memory_only(b)   (ngx_buf_in_memory(b) && !b->in_file)
#define ngx_buf_special(b)
#define ngx_buf_sync_only(b)
#define ngx_buf_size(b)
#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_free_chain(pool, cl)

Typedefs

typedef void * ngx_buf_tag_t
typedef struct ngx_buf_s ngx_buf_t
typedef struct
ngx_output_chain_ctx_s 
ngx_output_chain_ctx_t
typedef ngx_int_t(* ngx_output_chain_filter_pt )(void *ctx, ngx_chain_t *in)

Functions

ngx_buf_tngx_create_temp_buf (ngx_pool_t *pool, size_t size)
ngx_chain_tngx_create_chain_of_bufs (ngx_pool_t *pool, ngx_bufs_t *bufs)
ngx_chain_tngx_alloc_chain_link (ngx_pool_t *pool)
ngx_int_t ngx_output_chain (ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
ngx_int_t ngx_chain_writer (void *ctx, ngx_chain_t *in)
ngx_int_t ngx_chain_add_copy (ngx_pool_t *pool, ngx_chain_t **chain, ngx_chain_t *in)
ngx_chain_tngx_chain_get_free_buf (ngx_pool_t *p, ngx_chain_t **free)
void ngx_chain_update_chains (ngx_pool_t *p, ngx_chain_t **free, ngx_chain_t **busy, ngx_chain_t **out, ngx_buf_tag_t tag)

Macro Definition Documentation

#define ngx_alloc_buf (   pool)    ngx_palloc(pool, sizeof(ngx_buf_t))

Definition at line 142 of file ngx_buf.h.

#define ngx_buf_in_memory (   b)    (b->temporary || b->memory || b->mmap)

Definition at line 123 of file ngx_buf.h.

#define ngx_buf_in_memory_only (   b)    (ngx_buf_in_memory(b) && !b->in_file)

Definition at line 124 of file ngx_buf.h.

#define ngx_buf_size (   b)
Value:
(ngx_buf_in_memory(b) ? (off_t) (b->last - b->pos): \
(b->file_last - b->file_pos))

Definition at line 134 of file ngx_buf.h.

#define ngx_buf_special (   b)
Value:
((b->flush || b->last_buf || b->sync) \
&& !ngx_buf_in_memory(b) && !b->in_file)

Definition at line 126 of file ngx_buf.h.

#define ngx_buf_sync_only (   b)
Value:
(b->sync \
&& !ngx_buf_in_memory(b) && !b->in_file && !b->flush && !b->last_buf)

Definition at line 130 of file ngx_buf.h.

#define ngx_calloc_buf (   pool)    ngx_pcalloc(pool, sizeof(ngx_buf_t))

Definition at line 143 of file ngx_buf.h.

#define NGX_CHAIN_ERROR   (ngx_chain_t *) NGX_ERROR

Definition at line 120 of file ngx_buf.h.

#define ngx_free_chain (   pool,
  cl 
)
Value:
cl->next = pool->chain; \
pool->chain = cl

Definition at line 146 of file ngx_buf.h.

Typedef Documentation

typedef struct ngx_buf_s ngx_buf_t

Definition at line 18 of file ngx_buf.h.

typedef void* ngx_buf_tag_t

Definition at line 16 of file ngx_buf.h.

Definition at line 71 of file ngx_buf.h.

typedef ngx_int_t(* ngx_output_chain_filter_pt)(void *ctx, ngx_chain_t *in)

Definition at line 73 of file ngx_buf.h.

Function Documentation

ngx_chain_t* ngx_alloc_chain_link ( ngx_pool_t pool)

Definition at line 48 of file ngx_buf.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_chain_add_copy ( ngx_pool_t pool,
ngx_chain_t **  chain,
ngx_chain_t in 
)

Definition at line 127 of file ngx_buf.c.

Here is the call graph for this function:

ngx_chain_t* ngx_chain_get_free_buf ( ngx_pool_t p,
ngx_chain_t **  free 
)

Definition at line 156 of file ngx_buf.c.

Here is the call graph for this function:

Here is the caller graph for this function:

void ngx_chain_update_chains ( ngx_pool_t p,
ngx_chain_t **  free,
ngx_chain_t **  busy,
ngx_chain_t **  out,
ngx_buf_tag_t  tag 
)

Definition at line 184 of file ngx_buf.c.

Here is the caller graph for this function:

ngx_int_t ngx_chain_writer ( void *  ctx,
ngx_chain_t in 
)

Definition at line 602 of file ngx_output_chain.c.

Here is the call graph for this function:

ngx_chain_t* ngx_create_chain_of_bufs ( ngx_pool_t pool,
ngx_bufs_t bufs 
)

Definition at line 69 of file ngx_buf.c.

Here is the call graph for this function:

ngx_buf_t* ngx_create_temp_buf ( ngx_pool_t pool,
size_t  size 
)

Definition at line 13 of file ngx_buf.c.

Here is the call graph for this function:

Here is the caller graph for this function:

ngx_int_t ngx_output_chain ( ngx_output_chain_ctx_t ctx,
ngx_chain_t in 
)

Definition at line 42 of file ngx_output_chain.c.

Here is the call graph for this function: