Mercurial > hg > nginx
comparison src/event/ngx_event.c @ 8977:7c2adf237091 quic
Merged with the default branch.
author | Sergey Kandaurov <pluknet@nginx.com> |
---|---|
date | Tue, 25 Jan 2022 23:42:48 +0300 |
parents | c31d95fdaf65 e2d07e4ec636 |
children | c2f5d79cde64 |
comparison
equal
deleted
inserted
replaced
8976:4646a981111f | 8977:7c2adf237091 |
---|---|
53 ngx_uint_t ngx_use_accept_mutex; | 53 ngx_uint_t ngx_use_accept_mutex; |
54 ngx_uint_t ngx_accept_events; | 54 ngx_uint_t ngx_accept_events; |
55 ngx_uint_t ngx_accept_mutex_held; | 55 ngx_uint_t ngx_accept_mutex_held; |
56 ngx_msec_t ngx_accept_mutex_delay; | 56 ngx_msec_t ngx_accept_mutex_delay; |
57 ngx_int_t ngx_accept_disabled; | 57 ngx_int_t ngx_accept_disabled; |
58 ngx_uint_t ngx_use_exclusive_accept; | |
58 | 59 |
59 | 60 |
60 #if (NGX_STAT_STUB) | 61 #if (NGX_STAT_STUB) |
61 | 62 |
62 static ngx_atomic_t ngx_stat_accepted0; | 63 static ngx_atomic_t ngx_stat_accepted0; |
660 | 661 |
661 ngx_use_accept_mutex = 0; | 662 ngx_use_accept_mutex = 0; |
662 | 663 |
663 #endif | 664 #endif |
664 | 665 |
666 ngx_use_exclusive_accept = 0; | |
667 | |
665 ngx_queue_init(&ngx_posted_accept_events); | 668 ngx_queue_init(&ngx_posted_accept_events); |
666 ngx_queue_init(&ngx_posted_next_events); | 669 ngx_queue_init(&ngx_posted_next_events); |
667 ngx_queue_init(&ngx_posted_events); | 670 ngx_queue_init(&ngx_posted_events); |
668 | 671 |
669 if (ngx_event_timer_init(cycle->log) == NGX_ERROR) { | 672 if (ngx_event_timer_init(cycle->log) == NGX_ERROR) { |
905 #if (NGX_HAVE_EPOLLEXCLUSIVE) | 908 #if (NGX_HAVE_EPOLLEXCLUSIVE) |
906 | 909 |
907 if ((ngx_event_flags & NGX_USE_EPOLL_EVENT) | 910 if ((ngx_event_flags & NGX_USE_EPOLL_EVENT) |
908 && ccf->worker_processes > 1) | 911 && ccf->worker_processes > 1) |
909 { | 912 { |
913 ngx_use_exclusive_accept = 1; | |
914 | |
910 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_EXCLUSIVE_EVENT) | 915 if (ngx_add_event(rev, NGX_READ_EVENT, NGX_EXCLUSIVE_EVENT) |
911 == NGX_ERROR) | 916 == NGX_ERROR) |
912 { | 917 { |
913 return NGX_ERROR; | 918 return NGX_ERROR; |
914 } | 919 } |