Back to home page

Nginx displayed by LXR

Source navigation ]
Diff markup ]
Identifier search ]
general search ]
 
 
Version: nginx-1.15.12 ]​[ nginx-1.16.0 ]​

0001 
0002 /*
0003  * Copyright (C) Nginx, Inc.
0004  * Copyright (C) Valentin V. Bartenev
0005  */
0006 
0007 
0008 #ifndef _NGX_THREAD_POOL_H_INCLUDED_
0009 #define _NGX_THREAD_POOL_H_INCLUDED_
0010 
0011 
0012 #include <ngx_config.h>
0013 #include <ngx_core.h>
0014 #include <ngx_event.h>
0015 
0016 
0017 struct ngx_thread_task_s {
0018     ngx_thread_task_t   *next;
0019     ngx_uint_t           id;
0020     void                *ctx;
0021     void               (*handler)(void *data, ngx_log_t *log);
0022     ngx_event_t          event;
0023 };
0024 
0025 
0026 typedef struct ngx_thread_pool_s  ngx_thread_pool_t;
0027 
0028 
0029 ngx_thread_pool_t *ngx_thread_pool_add(ngx_conf_t *cf, ngx_str_t *name);
0030 ngx_thread_pool_t *ngx_thread_pool_get(ngx_cycle_t *cycle, ngx_str_t *name);
0031 
0032 ngx_thread_task_t *ngx_thread_task_alloc(ngx_pool_t *pool, size_t size);
0033 ngx_int_t ngx_thread_task_post(ngx_thread_pool_t *tp, ngx_thread_task_t *task);
0034 
0035 
0036 #endif /* _NGX_THREAD_POOL_H_INCLUDED_ */