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) {
|
if (ngx_process <= NGX_PROCESS_MASTER) {
|
||||||
|
|
||||||
/* process master, kernel network stack*/
|
/* 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,
|
/* We should continue to process the listening socket,
|
||||||
if it is not supported by fstack.*/
|
if it is not supported by fstack.*/
|
||||||
if (fstack_territory(ls[i].sockaddr->sa_family, ls[i].type, 0)) {
|
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) {
|
} else if (NGX_PROCESS_WORKER == ngx_process) {
|
||||||
/* process worker, fstack */
|
/* process worker, fstack */
|
||||||
if (ls[i].belong_to_aeds) {
|
if (ls[i].belong_to_host) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ struct ngx_listening_s {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
unsigned belong_to_aeds:1;
|
unsigned belong_to_host:1;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -567,7 +567,7 @@ ngx_ff_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd,
|
||||||
rev->channel = 1;
|
rev->channel = 1;
|
||||||
wev->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 = (event == NGX_READ_EVENT) ? rev : wev;
|
||||||
ev->handler = handler;
|
ev->handler = handler;
|
||||||
|
|
|
@ -783,7 +783,7 @@ ngx_event_process_init(ngx_cycle_t *cycle)
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
/* Note when nginx running on fstack,
|
/* Note when nginx running on fstack,
|
||||||
make sure that add the right fd to kqueue !! */
|
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
|
#endif
|
||||||
|
|
||||||
#if (NGX_HAVE_DEFERRED_ACCEPT)
|
#if (NGX_HAVE_DEFERRED_ACCEPT)
|
||||||
|
|
|
@ -144,7 +144,7 @@ struct ngx_event_s {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
unsigned belong_to_aeds:1;
|
unsigned belong_to_host:1;
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -417,7 +417,7 @@ extern ngx_event_actions_t ngx_event_actions_dy;
|
||||||
|
|
||||||
static inline ngx_int_t
|
static inline ngx_int_t
|
||||||
ngx_add_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) {
|
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);
|
return ngx_event_actions_dy.add(ev, event, flags);
|
||||||
} else {
|
} else {
|
||||||
return ngx_event_actions.add(ev, event, flags);
|
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
|
static inline ngx_int_t
|
||||||
ngx_del_event(ngx_event_t *ev, ngx_int_t event, ngx_uint_t flags) {
|
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);
|
return ngx_event_actions_dy.del(ev, event, flags);
|
||||||
} else {
|
} else {
|
||||||
return ngx_event_actions.del(ev, event, flags);
|
return ngx_event_actions.del(ev, event, flags);
|
||||||
|
|
|
@ -231,7 +231,7 @@ ngx_event_accept(ngx_event_t *ev)
|
||||||
wev = c->write;
|
wev = c->write;
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#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
|
#endif
|
||||||
|
|
||||||
wev->ready = 1;
|
wev->ready = 1;
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
\
|
\
|
||||||
if (!(ev)->posted) { \
|
if (!(ev)->posted) { \
|
||||||
(ev)->posted = 1; \
|
(ev)->posted = 1; \
|
||||||
if (1 == (ev)->belong_to_aeds) { \
|
if (1 == (ev)->belong_to_host) { \
|
||||||
if (q == &ngx_posted_events) { \
|
if (q == &ngx_posted_events) { \
|
||||||
ngx_queue_insert_tail( \
|
ngx_queue_insert_tail( \
|
||||||
&ngx_posted_events_of_aeds, &(ev)->queue); \
|
&ngx_posted_events_of_aeds, &(ev)->queue); \
|
||||||
|
|
|
@ -40,7 +40,7 @@ ngx_event_del_timer(ngx_event_t *ev)
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
|
|
||||||
if(ev->belong_to_aeds){
|
if(ev->belong_to_host){
|
||||||
ngx_rbtree_delete(&ngx_aeds_timer_rbtree, &ev->timer);
|
ngx_rbtree_delete(&ngx_aeds_timer_rbtree, &ev->timer);
|
||||||
} else {
|
} else {
|
||||||
ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer);
|
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 (NGX_HAVE_FSTACK)
|
||||||
|
|
||||||
if(ev->belong_to_aeds){
|
if(ev->belong_to_host){
|
||||||
ngx_rbtree_insert(&ngx_aeds_timer_rbtree, &ev->timer);
|
ngx_rbtree_insert(&ngx_aeds_timer_rbtree, &ev->timer);
|
||||||
} else {
|
} else {
|
||||||
ngx_rbtree_insert(&ngx_event_timer_rbtree, &ev->timer);
|
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
|
#endif
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
ls->belong_to_aeds = cscf->kernel_network_stack;
|
ls->belong_to_host = cscf->kernel_network_stack;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ls;
|
return ls;
|
||||||
|
|
|
@ -346,7 +346,7 @@ ngx_mail_optimize_servers(ngx_conf_t *cf, ngx_array_t *ports)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
ls->belong_to_aeds = cscf->kernel_network_stack;
|
ls->belong_to_host = cscf->kernel_network_stack;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mport = ngx_palloc(cf->pool, sizeof(ngx_mail_port_t));
|
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
|
#endif
|
||||||
|
|
||||||
#if (NGX_HAVE_FSTACK)
|
#if (NGX_HAVE_FSTACK)
|
||||||
ls->belong_to_aeds = cscf->kernel_network_stack;
|
ls->belong_to_host = cscf->kernel_network_stack;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t));
|
stport = ngx_palloc(cf->pool, sizeof(ngx_stream_port_t));
|
||||||
|
|
Loading…
Reference in New Issue