Mercurial > hg > nginx
comparison src/event/ngx_event_posted.c @ 380:5ce6561246a5
nginx-0.0.7-2004-07-07-10:15:04 import
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Wed, 07 Jul 2004 06:15:04 +0000 |
parents | 73688d5d7fc3 |
children | 02a511569afb |
comparison
equal
deleted
inserted
replaced
379:73688d5d7fc3 | 380:5ce6561246a5 |
---|---|
98 | 98 |
99 ev = ev->next; | 99 ev = ev->next; |
100 continue; | 100 continue; |
101 } | 101 } |
102 | 102 |
103 if (ev->lock != ev->own_lock) { | |
104 if (*(ev->own_lock)) { | |
105 ngx_log_error(NGX_LOG_ALERT, cycle->log, 0, | |
106 "the own lock of the posted event " | |
107 PTR_FMT " is busy", ev); | |
108 ngx_unlock(ev->lock); | |
109 ev = ev->next; | |
110 continue; | |
111 } | |
112 *(ev->own_lock) = 1; | |
113 } | |
114 | |
103 ngx_delete_posted_event(ev); | 115 ngx_delete_posted_event(ev); |
104 | 116 |
105 ev->locked = 1; | 117 ev->locked = 1; |
106 | 118 |
107 ev->ready |= ev->posted_ready; | 119 ev->ready |= ev->posted_ready; |
132 return NGX_ERROR; | 144 return NGX_ERROR; |
133 } | 145 } |
134 | 146 |
135 if (ev->locked) { | 147 if (ev->locked) { |
136 ngx_unlock(ev->lock); | 148 ngx_unlock(ev->lock); |
149 | |
150 if (ev->lock != ev->own_lock) { | |
151 ngx_unlock(ev->own_lock); | |
152 } | |
137 } | 153 } |
138 | 154 |
139 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, | 155 ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, 0, |
140 "posted event " PTR_FMT " is done", ev); | 156 "posted event " PTR_FMT " is done", ev); |
141 | 157 |