comparison src/event/modules/ngx_kqueue_module.c @ 6016:457ec43dd8d5

Renamed NGX_THREADS to NGX_OLD_THREADS because of deprecation. It's mostly dead code and the original idea of worker threads has been rejected.
author Ruslan Ermilov <ru@nginx.com>
date Wed, 04 Mar 2015 18:26:25 +0300
parents 3f5f0ab59b35
children 466bd63b63d1
comparison
equal deleted inserted replaced
6015:e11a8e7e8e0c 6016:457ec43dd8d5
46 46
47 static struct kevent *change_list, *change_list0, *change_list1; 47 static struct kevent *change_list, *change_list0, *change_list1;
48 static struct kevent *event_list; 48 static struct kevent *event_list;
49 static ngx_uint_t max_changes, nchanges, nevents; 49 static ngx_uint_t max_changes, nchanges, nevents;
50 50
51 #if (NGX_THREADS) 51 #if (NGX_OLD_THREADS)
52 static ngx_mutex_t *list_mutex; 52 static ngx_mutex_t *list_mutex;
53 static ngx_mutex_t *kevent_mutex; 53 static ngx_mutex_t *kevent_mutex;
54 #endif 54 #endif
55 55
56 56
131 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno, 131 ngx_log_error(NGX_LOG_EMERG, cycle->log, ngx_errno,
132 "kqueue() failed"); 132 "kqueue() failed");
133 return NGX_ERROR; 133 return NGX_ERROR;
134 } 134 }
135 135
136 #if (NGX_THREADS) 136 #if (NGX_OLD_THREADS)
137 137
138 list_mutex = ngx_mutex_init(cycle->log, 0); 138 list_mutex = ngx_mutex_init(cycle->log, 0);
139 if (list_mutex == NULL) { 139 if (list_mutex == NULL) {
140 return NGX_ERROR; 140 return NGX_ERROR;
141 } 141 }
255 "kqueue close() failed"); 255 "kqueue close() failed");
256 } 256 }
257 257
258 ngx_kqueue = -1; 258 ngx_kqueue = -1;
259 259
260 #if (NGX_THREADS) 260 #if (NGX_OLD_THREADS)
261 ngx_mutex_destroy(kevent_mutex); 261 ngx_mutex_destroy(kevent_mutex);
262 ngx_mutex_destroy(list_mutex); 262 ngx_mutex_destroy(list_mutex);
263 #endif 263 #endif
264 264
265 ngx_free(change_list1); 265 ngx_free(change_list1);