Mercurial > hg > nginx
comparison src/event/ngx_event_accept.c @ 208:0b67be7d4489
nginx-0.0.1-2003-12-08-23:48:12 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Mon, 08 Dec 2003 20:48:12 +0000 |
parents | 9aa426375256 |
children | 679f60139863 |
comparison
equal
deleted
inserted
replaced
207:6e0fef527732 | 208:0b67be7d4489 |
---|---|
197 | 197 |
198 c->log = log; | 198 c->log = log; |
199 rev->log = log; | 199 rev->log = log; |
200 wev->log = log; | 200 wev->log = log; |
201 | 201 |
202 /* TODO: x86: MT: lock xadd, MP: lock xadd, shared */ | 202 /* |
203 * In the multithreaded model the connection counter is updated by | |
204 * the main thread only that accept()s connections. | |
205 * | |
206 * TODO: MP: - allocated in a shared memory | |
207 * - atomic increment (x86: lock xadd) | |
208 * or protection by critical section or mutex | |
209 */ | |
203 c->number = ngx_connection_counter++; | 210 c->number = ngx_connection_counter++; |
204 | 211 |
205 ngx_log_debug(ev->log, "accept: %d, %d" _ s _ c->number); | 212 ngx_log_debug(ev->log, "accept: %d, %d" _ s _ c->number); |
206 | 213 |
207 if (ev->deferred_accept) { | 214 if (ev->deferred_accept) { |