Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
ngx_cycle.h
Go to the documentation of this file.
1 
2 /*
3  * Copyright (C) Igor Sysoev
4  * Copyright (C) Nginx, Inc.
5  */
6 
7 
8 #ifndef _NGX_CYCLE_H_INCLUDED_
9 #define _NGX_CYCLE_H_INCLUDED_
10 
11 
12 #include <ngx_config.h>
13 #include <ngx_core.h>
14 
15 
16 #ifndef NGX_CYCLE_POOL_SIZE
17 #define NGX_CYCLE_POOL_SIZE NGX_DEFAULT_POOL_SIZE
18 #endif
19 
20 
21 #define NGX_DEBUG_POINTS_STOP 1
22 #define NGX_DEBUG_POINTS_ABORT 2
23 
24 
26 
28 
30  void *data;
33  void *tag;
34 };
35 
36 
37 struct ngx_cycle_s {
38  void ****conf_ctx;
40 
43 
47 
49 
54 
57 
61 
63 
70 };
71 
72 
73 typedef struct {
76 
78 
81 
84  off_t rlimit_core;
85 
86  int priority;
87 
89  uint64_t *cpu_affinity;
90 
91  char *username;
94 
97 
100 
102  char **environment;
103 
104 #if (NGX_THREADS)
105  ngx_int_t worker_threads;
106  size_t thread_stack_size;
107 #endif
108 
110 
111 
112 typedef struct {
113  ngx_pool_t *pool; /* pcre's malloc() pool */
115 
116 
117 #define ngx_is_init_cycle(cycle) (cycle->conf_ctx == NULL)
118 
119 
122 void ngx_delete_pidfile(ngx_cycle_t *cycle);
123 ngx_int_t ngx_signal_process(ngx_cycle_t *cycle, char *sig);
124 void ngx_reopen_files(ngx_cycle_t *cycle, ngx_uid_t user);
125 char **ngx_set_environment(ngx_cycle_t *cycle, ngx_uint_t *last);
126 ngx_pid_t ngx_exec_new_binary(ngx_cycle_t *cycle, char *const *argv);
127 uint64_t ngx_get_cpu_affinity(ngx_uint_t n);
129  size_t size, void *tag);
130 
131 
132 extern volatile ngx_cycle_t *ngx_cycle;
137 #if (NGX_THREADS)
138 extern ngx_tls_key_t ngx_core_tls_key;
139 #endif
140 
141 
142 #endif /* _NGX_CYCLE_H_INCLUDED_ */