Mercurial > hg > nginx-quic
view src/event/ngx_event_mutex.c @ 79:eacfdd1c31b9
nginx-0.0.1-2003-04-22-19:02:58 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 22 Apr 2003 15:02:58 +0000 |
parents | d220029ac7f3 |
children | d4e65d74db9f |
line wrap: on
line source
spinlock_max depend on CPU number and mutex type. 1 CPU 1 ngx_malloc_mutex 1000 ? int ngx_event_mutex_trylock(ngx_mutex_t *mtx) { for(i = mtx->spinlock_max; i; i--) if (trylock(mtx->lock)) return 1; return 0; }