Removed unused single process type.
This commit is contained in:
@@ -19,21 +19,19 @@ nxt_pid_t nxt_pid;
|
|||||||
nxt_pid_t nxt_ppid;
|
nxt_pid_t nxt_ppid;
|
||||||
|
|
||||||
nxt_bool_t nxt_proc_conn_martix[NXT_PROCESS_MAX][NXT_PROCESS_MAX] = {
|
nxt_bool_t nxt_proc_conn_martix[NXT_PROCESS_MAX][NXT_PROCESS_MAX] = {
|
||||||
{ 0, 0, 0, 0, 0, 0 },
|
{ 1, 1, 1, 1, 1 },
|
||||||
{ 0, 1, 1, 1, 1, 1 },
|
{ 1, 0, 0, 0, 0 },
|
||||||
{ 0, 1, 0, 0, 0, 0 },
|
{ 1, 0, 0, 1, 0 },
|
||||||
{ 0, 1, 0, 0, 1, 0 },
|
{ 1, 0, 1, 0, 1 },
|
||||||
{ 0, 1, 0, 1, 0, 1 },
|
{ 1, 0, 0, 0, 0 },
|
||||||
{ 0, 1, 0, 0, 0, 0 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nxt_bool_t nxt_proc_remove_notify_martix[NXT_PROCESS_MAX][NXT_PROCESS_MAX] = {
|
nxt_bool_t nxt_proc_remove_notify_martix[NXT_PROCESS_MAX][NXT_PROCESS_MAX] = {
|
||||||
{ 0, 0, 0, 0, 0, 0 },
|
{ 0, 0, 0, 0, 0 },
|
||||||
{ 0, 0, 0, 0, 0, 0 },
|
{ 0, 0, 0, 0, 0 },
|
||||||
{ 0, 0, 0, 0, 0, 0 },
|
{ 0, 0, 0, 1, 0 },
|
||||||
{ 0, 0, 0, 0, 1, 0 },
|
{ 0, 0, 1, 0, 1 },
|
||||||
{ 0, 0, 0, 1, 0, 1 },
|
{ 0, 0, 0, 1, 0 },
|
||||||
{ 0, 0, 0, 0, 1, 0 },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nxt_pid_t
|
nxt_pid_t
|
||||||
|
|||||||
@@ -9,8 +9,7 @@
|
|||||||
|
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
NXT_PROCESS_SINGLE = 0,
|
NXT_PROCESS_MAIN = 0,
|
||||||
NXT_PROCESS_MAIN,
|
|
||||||
NXT_PROCESS_DISCOVERY,
|
NXT_PROCESS_DISCOVERY,
|
||||||
NXT_PROCESS_CONTROLLER,
|
NXT_PROCESS_CONTROLLER,
|
||||||
NXT_PROCESS_ROUTER,
|
NXT_PROCESS_ROUTER,
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ static nxt_int_t nxt_runtime_event_engines(nxt_task_t *task, nxt_runtime_t *rt);
|
|||||||
static nxt_int_t nxt_runtime_thread_pools(nxt_thread_t *thr, nxt_runtime_t *rt);
|
static nxt_int_t nxt_runtime_thread_pools(nxt_thread_t *thr, nxt_runtime_t *rt);
|
||||||
static void nxt_runtime_start(nxt_task_t *task, void *obj, void *data);
|
static void nxt_runtime_start(nxt_task_t *task, void *obj, void *data);
|
||||||
static void nxt_runtime_initial_start(nxt_task_t *task);
|
static void nxt_runtime_initial_start(nxt_task_t *task);
|
||||||
static void nxt_single_process_start(nxt_thread_t *thr, nxt_task_t *task,
|
|
||||||
nxt_runtime_t *rt);
|
|
||||||
static void nxt_runtime_close_idle_connections(nxt_event_engine_t *engine);
|
static void nxt_runtime_close_idle_connections(nxt_event_engine_t *engine);
|
||||||
static void nxt_runtime_exit(nxt_task_t *task, void *obj, void *data);
|
static void nxt_runtime_exit(nxt_task_t *task, void *obj, void *data);
|
||||||
static nxt_int_t nxt_runtime_event_engine_change(nxt_task_t *task,
|
static nxt_int_t nxt_runtime_event_engine_change(nxt_task_t *task,
|
||||||
@@ -403,13 +401,7 @@ nxt_runtime_initial_start(nxt_task_t *task)
|
|||||||
|
|
||||||
thr->engine->max_connections = rt->engine_connections;
|
thr->engine->max_connections = rt->engine_connections;
|
||||||
|
|
||||||
if (rt->main_process) {
|
if (nxt_main_process_start(thr, task, rt) != NXT_ERROR) {
|
||||||
if (nxt_main_process_start(thr, task, rt) != NXT_ERROR) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
} else {
|
|
||||||
nxt_single_process_start(thr, task, rt);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -419,27 +411,6 @@ fail:
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
|
||||||
nxt_single_process_start(nxt_thread_t *thr, nxt_task_t *task, nxt_runtime_t *rt)
|
|
||||||
{
|
|
||||||
nxt_int_t ret;
|
|
||||||
|
|
||||||
ret = nxt_runtime_thread_pool_create(thr, rt, rt->auxiliary_threads,
|
|
||||||
60000 * 1000000LL);
|
|
||||||
|
|
||||||
if (nxt_slow_path(ret != NXT_OK)) {
|
|
||||||
nxt_runtime_quit(task);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
rt->types |= (1U << NXT_PROCESS_SINGLE);
|
|
||||||
|
|
||||||
nxt_runtime_listen_sockets_enable(task, rt);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
nxt_runtime_quit(nxt_task_t *task)
|
nxt_runtime_quit(nxt_task_t *task)
|
||||||
{
|
{
|
||||||
@@ -709,7 +680,6 @@ nxt_runtime_conf_init(nxt_task_t *task, nxt_runtime_t *rt)
|
|||||||
const nxt_event_interface_t *interface;
|
const nxt_event_interface_t *interface;
|
||||||
|
|
||||||
rt->daemon = 1;
|
rt->daemon = 1;
|
||||||
rt->main_process = 1;
|
|
||||||
rt->engine_connections = 256;
|
rt->engine_connections = 256;
|
||||||
rt->auxiliary_threads = 2;
|
rt->auxiliary_threads = 2;
|
||||||
rt->user_cred.user = NXT_USER;
|
rt->user_cred.user = NXT_USER;
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ struct nxt_runtime_s {
|
|||||||
|
|
||||||
uint8_t daemon;
|
uint8_t daemon;
|
||||||
uint8_t batch;
|
uint8_t batch;
|
||||||
uint8_t main_process;
|
|
||||||
const char *engine;
|
const char *engine;
|
||||||
uint32_t engine_connections;
|
uint32_t engine_connections;
|
||||||
uint32_t auxiliary_threads;
|
uint32_t auxiliary_threads;
|
||||||
|
|||||||
Reference in New Issue
Block a user