summaryrefslogtreecommitdiffhomepage
path: root/src/event
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2004-06-06 19:49:18 +0000
committerIgor Sysoev <igor@sysoev.ru>2004-06-06 19:49:18 +0000
commit0ab91b901299ac41e3867ebec7e04e5082a4c8b4 (patch)
treeb89e863c141bc482c85c351f84d9dca1d3570789 /src/event
parent6e1bbd78967660b49e3a120bbeec6382ed193d5f (diff)
downloadnginx-0ab91b901299ac41e3867ebec7e04e5082a4c8b4.tar.gz
nginx-0ab91b901299ac41e3867ebec7e04e5082a4c8b4.tar.bz2
nginx-0.0.3-2004-06-06-23:49:18 import
Diffstat (limited to 'src/event')
-rw-r--r--src/event/modules/ngx_rtsig_module.c4
-rw-r--r--src/event/ngx_event.c2
-rw-r--r--src/event/ngx_event.h4
-rw-r--r--src/event/ngx_event_accept.c26
4 files changed, 19 insertions, 17 deletions
diff --git a/src/event/modules/ngx_rtsig_module.c b/src/event/modules/ngx_rtsig_module.c
index 120624594..ec7dd17bc 100644
--- a/src/event/modules/ngx_rtsig_module.c
+++ b/src/event/modules/ngx_rtsig_module.c
@@ -114,7 +114,7 @@ static int ngx_rtsig_init(ngx_cycle_t *cycle)
ngx_event_actions = ngx_rtsig_module_ctx.actions;
- ngx_event_flags = NGX_USE_SIGIO_EVENT
+ ngx_event_flags = NGX_USE_RTSIG_EVENT
|NGX_HAVE_GREEDY_EVENT
|NGX_HAVE_INSTANCE_EVENT;
@@ -423,7 +423,7 @@ static int ngx_rtsig_process_overflow(ngx_cycle_t *cycle)
{
if (ngx_poll_module_ctx.actions.process(cycle) == NGX_OK) {
ngx_event_actions = ngx_rtsig_module_ctx.actions;
- ngx_event_flags = NGX_USE_SIGIO_EVENT;
+ ngx_event_flags = NGX_USE_RTSIG_EVENT;
}
return NGX_OK;
diff --git a/src/event/ngx_event.c b/src/event/ngx_event.c
index e9ec48ece..b8bed8950 100644
--- a/src/event/ngx_event.c
+++ b/src/event/ngx_event.c
@@ -375,7 +375,7 @@ static ngx_int_t ngx_event_process_init(ngx_cycle_t *cycle)
continue;
}
- if (ngx_event_flags & NGX_USE_SIGIO_EVENT) {
+ if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
if (ngx_add_conn(c) == NGX_ERROR) {
return NGX_ERROR;
}
diff --git a/src/event/ngx_event.h b/src/event/ngx_event.h
index e85f531b7..1b9dfb290 100644
--- a/src/event/ngx_event.h
+++ b/src/event/ngx_event.h
@@ -101,6 +101,8 @@ struct ngx_event_s {
unsigned short deferred_accept:1;
+ unsigned short overflow:1;
+
/* TODO: aio_eof and kq_eof can be the single pending_eof */
/* the pending eof in aio chain operation */
unsigned short aio_eof:1;
@@ -244,7 +246,7 @@ extern ngx_event_actions_t ngx_event_actions;
/*
* No need to add or delete the event filters - rt signals.
*/
-#define NGX_USE_SIGIO_EVENT 0x00000100
+#define NGX_USE_RTSIG_EVENT 0x00000100
/*
* The alternative event method after the rt signals queue overflow.
diff --git a/src/event/ngx_event_accept.c b/src/event/ngx_event_accept.c
index 5a3a451e7..9b53edbb5 100644
--- a/src/event/ngx_event_accept.c
+++ b/src/event/ngx_event_accept.c
@@ -30,7 +30,7 @@ void ngx_event_accept(ngx_event_t *ev)
ecf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_event_core_module);
- if (ngx_event_flags & (NGX_USE_EDGE_EVENT|NGX_USE_SIGIO_EVENT)) {
+ if (ngx_event_flags & (NGX_USE_EDGE_EVENT|NGX_USE_RTSIG_EVENT)) {
ev->available = 1;
} else if (!(ngx_event_flags & NGX_HAVE_KQUEUE_EVENT)) {
@@ -52,9 +52,9 @@ void ngx_event_accept(ngx_event_t *ev)
if (pool == NULL) {
/*
- * Create the pool before accept() to avoid copy the sockaddr.
- * Although accept() can fail it's an uncommon case
- * and besides the pool can be got from the free pool list
+ * Create the pool before accept() to avoid the copying of
+ * the sockaddr. Although accept() can fail it is uncommon
+ * case and besides the pool can be got from the free pool list
*/
if (!(pool = ngx_create_pool(ls->listening->pool_size, ev->log))) {
@@ -80,7 +80,7 @@ void ngx_event_accept(ngx_event_t *ev)
return;
}
- /* -1 disable logging the connection number */
+ /* -1 disables the connection number logging */
ctx->flag = -1;
ctx->name = ls->listening->addr_text.data;
@@ -95,7 +95,7 @@ void ngx_event_accept(ngx_event_t *ev)
if (err == NGX_EAGAIN) {
if (!(ngx_event_flags
- & (NGX_USE_EDGE_EVENT|NGX_USE_SIGIO_EVENT)))
+ & (NGX_USE_EDGE_EVENT|NGX_USE_RTSIG_EVENT)))
{
ngx_log_error(NGX_LOG_NOTICE, log, err,
"EAGAIN after %d accepted connection(s)",
@@ -167,7 +167,7 @@ void ngx_event_accept(ngx_event_t *ev)
}
} else {
- if (!(ngx_event_flags & NGX_USE_AIO_EVENT)) {
+ if (!(ngx_event_flags & (NGX_USE_AIO_EVENT|NGX_USE_RTSIG_EVENT))) {
if (ngx_nonblocking(s) == -1) {
ngx_log_error(NGX_LOG_ALERT, log, ngx_socket_errno,
ngx_nonblocking_n " failed");
@@ -246,9 +246,9 @@ void ngx_event_accept(ngx_event_t *ev)
wev->ready = 1;
if (ngx_event_flags
- & (NGX_USE_AIO_EVENT|NGX_USE_EDGE_EVENT|NGX_USE_SIGIO_EVENT))
+ & (NGX_USE_AIO_EVENT|NGX_USE_EDGE_EVENT|NGX_USE_RTSIG_EVENT))
{
- /* aio, iocp, sigio, epoll */
+ /* epoll, rtsig, aio, iocp */
rev->ready = 1;
}
@@ -366,12 +366,12 @@ ngx_int_t ngx_enable_accept_events(ngx_cycle_t *cycle)
for (i = 0; i < cycle->listening.nelts; i++) {
/*
- * we do not need to handle the Winsock sockets here (divde a socket
+ * we do not need to handle the Winsock sockets here (divide a socket
* number by 4) because this function would never called
* in the Winsock environment
*/
- if (ngx_event_flags & NGX_USE_SIGIO_EVENT) {
+ if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
if (ngx_add_conn(&cycle->connections[s[i].fd]) == NGX_ERROR) {
return NGX_ERROR;
}
@@ -398,12 +398,12 @@ ngx_int_t ngx_disable_accept_events(ngx_cycle_t *cycle)
for (i = 0; i < cycle->listening.nelts; i++) {
/*
- * we do not need to handle the Winsock sockets here (divde a socket
+ * we do not need to handle the Winsock sockets here (divide a socket
* number by 4) because this function would never called
* in the Winsock environment
*/
- if (ngx_event_flags & NGX_USE_SIGIO_EVENT) {
+ if (ngx_event_flags & NGX_USE_RTSIG_EVENT) {
if (!cycle->connections[s[i].fd].read->active) {
continue;
}