nxt_runtime.h (234:e0f17b03f52b) nxt_runtime.h (240:36bafba970b5)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#ifndef _NXT_RUNTIME_H_INCLUDED_

--- 35 unchanged lines hidden (view full) ---

44 uint32_t last_engine_id;
45
46 uint32_t types; /* bitset of nxt_process_type_t */
47
48 nxt_timer_t timer;
49
50 uint8_t daemon;
51 uint8_t batch;
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#ifndef _NXT_RUNTIME_H_INCLUDED_

--- 35 unchanged lines hidden (view full) ---

44 uint32_t last_engine_id;
45
46 uint32_t types; /* bitset of nxt_process_type_t */
47
48 nxt_timer_t timer;
49
50 uint8_t daemon;
51 uint8_t batch;
52 uint8_t master_process;
52 uint8_t main_process;
53 const char *engine;
54 uint32_t engine_connections;
55 uint32_t auxiliary_threads;
56 nxt_user_cred_t user_cred;
57 const char *group;
58 const char *pid;
59 const char *log;
60 const char *modules;

--- 23 unchanged lines hidden (view full) ---

84nxt_inline nxt_bool_t
85nxt_runtime_is_type(nxt_runtime_t *rt, nxt_process_type_t type)
86{
87 return (rt->types & (1U << type)) != 0;
88}
89
90
91nxt_inline nxt_bool_t
53 const char *engine;
54 uint32_t engine_connections;
55 uint32_t auxiliary_threads;
56 nxt_user_cred_t user_cred;
57 const char *group;
58 const char *pid;
59 const char *log;
60 const char *modules;

--- 23 unchanged lines hidden (view full) ---

84nxt_inline nxt_bool_t
85nxt_runtime_is_type(nxt_runtime_t *rt, nxt_process_type_t type)
86{
87 return (rt->types & (1U << type)) != 0;
88}
89
90
91nxt_inline nxt_bool_t
92nxt_runtime_is_master(nxt_runtime_t *rt)
92nxt_runtime_is_main(nxt_runtime_t *rt)
93{
93{
94 return nxt_runtime_is_type(rt, NXT_PROCESS_MASTER);
94 return nxt_runtime_is_type(rt, NXT_PROCESS_MAIN);
95}
96
97
98nxt_process_t *nxt_runtime_process_new(nxt_runtime_t *rt);
99
100nxt_process_t *nxt_runtime_process_get(nxt_runtime_t *rt, nxt_pid_t pid);
101
102void nxt_runtime_process_add(nxt_runtime_t *rt, nxt_process_t *process);

--- 82 unchanged lines hidden ---
95}
96
97
98nxt_process_t *nxt_runtime_process_new(nxt_runtime_t *rt);
99
100nxt_process_t *nxt_runtime_process_get(nxt_runtime_t *rt, nxt_pid_t pid);
101
102void nxt_runtime_process_add(nxt_runtime_t *rt, nxt_process_t *process);

--- 82 unchanged lines hidden ---