mirror of https://github.com/F-Stack/f-stack.git
Using a more friendly name : belong_to_aeds to belong_to_host
This commit is contained in:
parent
447a82c866
commit
5c797d9e1a
|
@ -413,7 +413,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
|
|||
if (ngx_process <= NGX_PROCESS_MASTER) {
|
||||
|
||||
/* process master, kernel network stack*/
|
||||
if (!ls[i].belong_to_aeds) {
|
||||
if (!ls[i].belong_to_host) {
|
||||
/* We should continue to process the listening socket,
|
||||
if it is not supported by fstack.*/
|
||||
if (fstack_territory(ls[i].sockaddr->sa_family, ls[i].type, 0)) {
|
||||
|
@ -422,7 +422,7 @@ ngx_open_listening_sockets(ngx_cycle_t *cycle)
|
|||
}
|
||||
} else if (NGX_PROCESS_WORKER == ngx_process) {
|
||||
/* process worker, fstack */
|
||||
if (ls[i].belong_to_aeds) {
|
||||
if (ls[i].belong_to_host) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ struct ngx_listening_s {
|
|||
#endif
|
||||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
unsigned belong_to_aeds:1;
|
||||
unsigned belong_to_host:1;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
|
@ -567,7 +567,7 @@ ngx_ff_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd,
|
|||
rev->channel = 1;
|
||||
wev->channel = 1;
|
||||
|
||||
rev->belong_to_aeds = wev->belong_to_aeds = 1;
|
||||
rev->belong_to_host = wev->belong_to_host = 1;
|
||||
|
||||
ev = (event == NGX_READ_EVENT) ? rev : wev;
|
||||
ev->handler = handler;
|
||||
|
|
|
@ -783,7 +783,7 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
|||
#if (NGX_HAVE_FSTACK)
|
||||
/* Note when nginx running on fstack,
|
||||
make sure that add the right fd to kqueue !! */
|
||||
c->read->belong_to_aeds = c->write->belong_to_aeds = ls[i].belong_to_aeds;
|
||||
c->read->belong_to_host = c->write->belong_to_host = ls[i].belong_to_host;
|
||||
#endif
|
||||
|
||||
#if (NGX_HAVE_DEFERRED_ACCEPT)
|
||||
|
|
|
@ -144,7 +144,7 @@ struct ngx_event_s {
|
|||
#endif
|
||||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
unsigned belong_to_aeds:1;
|
||||
unsigned belong_to_host:1;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -417,7 +417,7 @@ extern ngx_event_actions_t ngx_event_actions_dy;
|
|||
|
||||
static inline ngx_int_t
|
||||
ngx_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) {
|
||||
if (1 == ev->belong_to_aeds) {
|
||||
if (1 == ev->belong_to_host) {
|
||||
return ngx_event_actions_dy.add(ev, event, flags);
|
||||
} else {
|
||||
return ngx_event_actions.add(ev, event, flags);
|
||||
|
@ -426,7 +426,7 @@ extern ngx_event_actions_t ngx_event_actions_dy;
|
|||
|
||||
static inline ngx_int_t
|
||||
ngx_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) {
|
||||
if (1 == ev->belong_to_aeds) {
|
||||
if (1 == ev->belong_to_host) {
|
||||
return ngx_event_actions_dy.del(ev, event, flags);
|
||||
} else {
|
||||
return ngx_event_actions.del(ev, event, flags);
|
||||
|
|
|
@ -231,7 +231,7 @@ ngx_event_accept(ngx_event_t *ev)
|
|||
wev = c->write;
|
||||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
rev->belong_to_aeds = wev->belong_to_aeds = ev->belong_to_aeds;
|
||||
rev->belong_to_host = wev->belong_to_host = ev->belong_to_host;
|
||||
#endif
|
||||
|
||||
wev->ready = 1;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
\
|
||||
if (!(ev)->posted) { \
|
||||
(ev)->posted = 1; \
|
||||
if (1 == (ev)->belong_to_aeds) { \
|
||||
if (1 == (ev)->belong_to_host) { \
|
||||
if (q == &ngx_posted_events) { \
|
||||
ngx_queue_insert_tail( \
|
||||
&ngx_posted_events_of_aeds, &(ev)->queue); \
|
||||
|
|
|
@ -40,7 +40,7 @@ ngx_event_del_timer(ngx_event_t *ev)
|
|||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
|
||||
if(ev->belong_to_aeds){
|
||||
if(ev->belong_to_host){
|
||||
ngx_rbtree_delete(&ngx_aeds_timer_rbtree, &ev->timer);
|
||||
} else {
|
||||
ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
|
||||
|
@ -98,7 +98,7 @@ ngx_event_add_timer(ngx_event_t *ev, ngx_msec_t timer)
|
|||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
|
||||
if(ev->belong_to_aeds){
|
||||
if(ev->belong_to_host){
|
||||
ngx_rbtree_insert(&ngx_aeds_timer_rbtree, &ev->timer);
|
||||
} else {
|
||||
ngx_rbtree_insert(&ngx_event_timer_rbtree, &ev->timer);
|
||||
|
|
|
@ -1776,7 +1776,7 @@ ngx_http_add_listening(ngx_conf_t *cf, ngx_http_conf_addr_t *addr)
|
|||
#endif
|
||||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
ls->belong_to_aeds = cscf->kernel_network_stack;
|
||||
ls->belong_to_host = cscf->kernel_network_stack;
|
||||
#endif
|
||||
|
||||
return ls;
|
||||
|
|
|
@ -346,7 +346,7 @@ ngx_mail_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
|
|||
#endif
|
||||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
ls->belong_to_aeds = cscf->kernel_network_stack;
|
||||
ls->belong_to_host = cscf->kernel_network_stack;
|
||||
#endif
|
||||
|
||||
mport = ngx_palloc(cf->pool, sizeof(ngx_mail_port_t));
|
||||
|
|
|
@ -513,7 +513,7 @@ ngx_stream_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
|
|||
#endif
|
||||
|
||||
#if (NGX_HAVE_FSTACK)
|
||||
ls->belong_to_aeds = cscf->kernel_network_stack;
|
||||
ls->belong_to_host = cscf->kernel_network_stack;
|
||||
#endif
|
||||
|
||||
stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t));
|
||||
|
|
Loading…
Reference in New Issue