comparison src/core/ngx_cycle.h @ 972:6e7a20529f53

ngx_shared_memory_add()
author Igor Sysoev <igor@sysoev.ru>
date Tue, 02 Jan 2007 23:54:14 +0000
parents d1d8cde9aab9
children 1b9a4d92173f
comparison
equal deleted inserted replaced
971:948acd940145 972:6e7a20529f53
19 19
20 #define NGX_DEBUG_POINTS_STOP 1 20 #define NGX_DEBUG_POINTS_STOP 1
21 #define NGX_DEBUG_POINTS_ABORT 2 21 #define NGX_DEBUG_POINTS_ABORT 2
22 22
23 23
24 typedef struct { 24 typedef struct ngx_shm_zone_s ngx_shm_zone_t;
25
26 typedef ngx_int_t (*ngx_shm_zone_init_pt) (ngx_shm_zone_t *zone);
27
28 struct ngx_shm_zone_s {
29 void *data;
25 ngx_shm_t shm; 30 ngx_shm_t shm;
31 ngx_shm_zone_init_pt init;
26 ngx_str_t name; 32 ngx_str_t name;
27 } ngx_shm_zone_t; 33 void *tag;
34 };
28 35
29 36
30 struct ngx_cycle_s { 37 struct ngx_cycle_s {
31 void ****conf_ctx; 38 void ****conf_ctx;
32 ngx_pool_t *pool; 39 ngx_pool_t *pool;
106 ngx_int_t ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log); 113 ngx_int_t ngx_create_pidfile(ngx_str_t *name, ngx_log_t *log);
107 void ngx_delete_pidfile(ngx_cycle_t *cycle); 114 void ngx_delete_pidfile(ngx_cycle_t *cycle);
108 void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user); 115 void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user);
109 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv); 116 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
110 u_long ngx_get_cpu_affinity(ngx_uint_t n); 117 u_long ngx_get_cpu_affinity(ngx_uint_t n);
118 ngx_shm_zone_t *ngx_shared_memory_add(ngx_conf_t *cf, ngx_str_t *name,
119 size_t size, void *tag);
111 120
112 121
113 extern volatile ngx_cycle_t *ngx_cycle; 122 extern volatile ngx_cycle_t *ngx_cycle;
114 extern ngx_array_t ngx_old_cycles; 123 extern ngx_array_t ngx_old_cycles;
115 extern ngx_module_t ngx_core_module; 124 extern ngx_module_t ngx_core_module;