From acc0462acd1c3d50554cecb06d484b86a8403150 Mon Sep 17 00:00:00 2001 From: chenwei Date: Sat, 9 Dec 2017 15:24:58 +0800 Subject: [PATCH] rename "timers" and "events_posted" --- .../event/modules/ngx_ff_host_event_module.c | 18 +++++++++--------- app/nginx-1.11.10/src/event/ngx_event.c | 4 ++-- app/nginx-1.11.10/src/event/ngx_event_posted.c | 4 ++-- app/nginx-1.11.10/src/event/ngx_event_posted.h | 8 ++++---- app/nginx-1.11.10/src/event/ngx_event_timer.c | 18 +++++++++--------- app/nginx-1.11.10/src/event/ngx_event_timer.h | 6 +++--- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/app/nginx-1.11.10/src/event/modules/ngx_ff_host_event_module.c b/app/nginx-1.11.10/src/event/modules/ngx_ff_host_event_module.c index 64ec20a7e..3e57261a1 100644 --- a/app/nginx-1.11.10/src/event/modules/ngx_ff_host_event_module.c +++ b/app/nginx-1.11.10/src/event/modules/ngx_ff_host_event_module.c @@ -56,10 +56,10 @@ static void ngx_ff_process_events_and_timers(ngx_cycle_t *cycle); ngx_int_t ngx_ff_start_worker_channel(ngx_cycle_t *cycle, ngx_fd_t fd, ngx_int_t event); -void ngx_aeds_cancel_timers(void); -void ngx_aeds_expire_timers(void); -ngx_msec_t ngx_aeds_find_timer(void); -void ngx_aeds_cancel_timers(void); +void ngx_event_cancel_timers_of_host(void); +void ngx_event_expire_timers_of_host(void); +ngx_msec_t ngx_event_find_timer_of_host(void); +void ngx_event_cancel_timers_of_host(void); struct channel_thread_args { ngx_cycle_t *cycle; @@ -678,7 +678,7 @@ ngx_ff_host_event_thread_main(void *args) } } - ngx_aeds_cancel_timers(); + ngx_event_cancel_timers_of_host(); ngx_free(cta); @@ -691,7 +691,7 @@ ngx_ff_process_events_and_timers(ngx_cycle_t *cycle) ngx_uint_t flags; ngx_msec_t timer, delta; - timer = ngx_aeds_find_timer(); + timer = ngx_event_find_timer_of_host(); flags = NGX_UPDATE_TIME; /* handle signals from master in case of network inactivity */ @@ -706,13 +706,13 @@ ngx_ff_process_events_and_timers(ngx_cycle_t *cycle) delta = ngx_current_msec - delta; - ngx_event_process_posted(cycle, &ngx_posted_accept_events_of_aeds); + ngx_event_process_posted(cycle, &ngx_posted_accept_events_of_host); if (delta) { - ngx_aeds_expire_timers(); + ngx_event_expire_timers_of_host(); } - ngx_event_process_posted(cycle, &ngx_posted_events_of_aeds); + ngx_event_process_posted(cycle, &ngx_posted_events_of_host); } diff --git a/app/nginx-1.11.10/src/event/ngx_event.c b/app/nginx-1.11.10/src/event/ngx_event.c index 8df48414e..71016c95b 100644 --- a/app/nginx-1.11.10/src/event/ngx_event.c +++ b/app/nginx-1.11.10/src/event/ngx_event.c @@ -608,8 +608,8 @@ ngx_event_process_init(ngx_cycle_t *cycle) ngx_queue_init(&ngx_posted_events); #if (NGX_HAVE_FSTACK) - ngx_queue_init(&ngx_posted_accept_events_of_aeds); - ngx_queue_init(&ngx_posted_events_of_aeds); + ngx_queue_init(&ngx_posted_accept_events_of_host); + ngx_queue_init(&ngx_posted_events_of_host); #endif if (ngx_event_timer_init(cycle->log) == NGX_ERROR) { diff --git a/app/nginx-1.11.10/src/event/ngx_event_posted.c b/app/nginx-1.11.10/src/event/ngx_event_posted.c index 5c9d669f6..d6f52c19a 100644 --- a/app/nginx-1.11.10/src/event/ngx_event_posted.c +++ b/app/nginx-1.11.10/src/event/ngx_event_posted.c @@ -14,8 +14,8 @@ ngx_queue_t ngx_posted_accept_events; ngx_queue_t ngx_posted_events; #if (NGX_HAVE_FSTACK) -ngx_queue_t ngx_posted_accept_events_of_aeds; -ngx_queue_t ngx_posted_events_of_aeds; +ngx_queue_t ngx_posted_accept_events_of_host; +ngx_queue_t ngx_posted_events_of_host; #endif diff --git a/app/nginx-1.11.10/src/event/ngx_event_posted.h b/app/nginx-1.11.10/src/event/ngx_event_posted.h index b9ca53b3c..9280f56dd 100644 --- a/app/nginx-1.11.10/src/event/ngx_event_posted.h +++ b/app/nginx-1.11.10/src/event/ngx_event_posted.h @@ -22,10 +22,10 @@ if (1 == (ev)->belong_to_host) { \ if (q == &ngx_posted_events) { \ ngx_queue_insert_tail( \ - &ngx_posted_events_of_aeds, &(ev)->queue); \ + &ngx_posted_events_of_host, &(ev)->queue); \ } else if (q == &ngx_posted_accept_events) { \ ngx_queue_insert_tail( \ - &ngx_posted_accept_events_of_aeds, &(ev)->queue); \ + &ngx_posted_accept_events_of_host, &(ev)->queue); \ } else { \ ngx_log_error(NGX_LOG_EMERG, (ev)->log, 0, \ "ngx_post_event: unkowned posted queue"); \ @@ -74,8 +74,8 @@ extern ngx_queue_t ngx_posted_accept_events; extern ngx_queue_t ngx_posted_events; #if (NGX_HAVE_FSTACK) -extern ngx_queue_t ngx_posted_accept_events_of_aeds; -extern ngx_queue_t ngx_posted_events_of_aeds; +extern ngx_queue_t ngx_posted_accept_events_of_host; +extern ngx_queue_t ngx_posted_events_of_host; #endif #endif /* _NGX_EVENT_POSTED_H_INCLUDED_ */ diff --git a/app/nginx-1.11.10/src/event/ngx_event_timer.c b/app/nginx-1.11.10/src/event/ngx_event_timer.c index 0b3982c8b..dab2168a2 100644 --- a/app/nginx-1.11.10/src/event/ngx_event_timer.c +++ b/app/nginx-1.11.10/src/event/ngx_event_timer.c @@ -14,8 +14,8 @@ ngx_rbtree_t ngx_event_timer_rbtree; static ngx_rbtree_node_t ngx_event_timer_sentinel; #if (NGX_HAVE_FSTACK) -ngx_rbtree_t ngx_aeds_timer_rbtree; -static ngx_rbtree_node_t ngx_aeds_timer_sentinel; +ngx_rbtree_t ngx_event_timer_rbtree_of_host; +static ngx_rbtree_node_t ngx_event_timer_sentinel_of_host; #endif /* @@ -32,7 +32,7 @@ ngx_event_timer_init(ngx_log_t *log) #if (NGX_HAVE_FSTACK) - ngx_rbtree_init(&ngx_aeds_timer_rbtree, &ngx_aeds_timer_sentinel, + ngx_rbtree_init(&ngx_event_timer_rbtree_of_host, &ngx_event_timer_sentinel_of_host, ngx_rbtree_insert_timer_value); #endif @@ -53,9 +53,9 @@ ngx_event_find_timer(void) } ngx_msec_t -ngx_aeds_find_timer(void) +ngx_event_find_timer_of_host(void) { - return ngx_event_find_timer_internal(&ngx_aeds_timer_rbtree, &ngx_aeds_timer_sentinel); + return ngx_event_find_timer_internal(&ngx_event_timer_rbtree_of_host, &ngx_event_timer_sentinel_of_host); } ngx_msec_t @@ -99,9 +99,9 @@ ngx_event_expire_timers(void) } void -ngx_aeds_expire_timers(void) +ngx_event_expire_timers_of_host(void) { - ngx_event_expire_timers_internal(&ngx_aeds_timer_rbtree); + ngx_event_expire_timers_internal(&ngx_event_timer_rbtree_of_host); } void @@ -168,9 +168,9 @@ ngx_event_cancel_timers(void) } void -ngx_aeds_cancel_timers(void) +ngx_event_cancel_timers_of_host(void) { - ngx_event_cancel_timers_internal(&ngx_aeds_timer_rbtree); + ngx_event_cancel_timers_internal(&ngx_event_timer_rbtree_of_host); } void diff --git a/app/nginx-1.11.10/src/event/ngx_event_timer.h b/app/nginx-1.11.10/src/event/ngx_event_timer.h index 466f3183b..533b11134 100644 --- a/app/nginx-1.11.10/src/event/ngx_event_timer.h +++ b/app/nginx-1.11.10/src/event/ngx_event_timer.h @@ -28,7 +28,7 @@ void ngx_event_cancel_timers(void); extern ngx_rbtree_t ngx_event_timer_rbtree; #if (NGX_HAVE_FSTACK) -extern ngx_rbtree_t ngx_aeds_timer_rbtree; +extern ngx_rbtree_t ngx_event_timer_rbtree_of_host; #endif static ngx_inline void @@ -41,7 +41,7 @@ ngx_event_del_timer(ngx_event_t *ev) #if (NGX_HAVE_FSTACK) if(ev->belong_to_host){ - ngx_rbtree_delete(&ngx_aeds_timer_rbtree, &ev->timer); + ngx_rbtree_delete(&ngx_event_timer_rbtree_of_host, &ev->timer); } else { ngx_rbtree_delete(&ngx_event_timer_rbtree, &ev->timer); } @@ -99,7 +99,7 @@ ngx_event_add_timer(ngx_event_t *ev, ngx_msec_t timer) #if (NGX_HAVE_FSTACK) if(ev->belong_to_host){ - ngx_rbtree_insert(&ngx_aeds_timer_rbtree, &ev->timer); + ngx_rbtree_insert(&ngx_event_timer_rbtree_of_host, &ev->timer); } else { ngx_rbtree_insert(&ngx_event_timer_rbtree, &ev->timer); }