summaryrefslogtreecommitdiff
path: root/src/os/unix
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/unix')
-rw-r--r--src/os/unix/ngx_channel.c7
-rw-r--r--src/os/unix/ngx_posix_init.c4
-rw-r--r--src/os/unix/ngx_process_cycle.c9
-rw-r--r--src/os/unix/ngx_setproctitle.h4
4 files changed, 9 insertions, 15 deletions
diff --git a/src/os/unix/ngx_channel.c b/src/os/unix/ngx_channel.c
index 8e9069660..1efa0667c 100644
--- a/src/os/unix/ngx_channel.c
+++ b/src/os/unix/ngx_channel.c
@@ -216,13 +216,6 @@ ngx_add_channel_event(ngx_cycle_t *cycle, ngx_fd_t fd, ngx_int_t event,
rev->log = cycle->log;
wev->log = cycle->log;
-#if (NGX_THREADS)
- rev->lock = &c->lock;
- wev->lock = &c->lock;
- rev->own_lock = &c->lock;
- wev->own_lock = &c->lock;
-#endif
-
rev->channel = 1;
wev->channel = 1;
diff --git a/src/os/unix/ngx_posix_init.c b/src/os/unix/ngx_posix_init.c
index 9a4de022d..bf3a310aa 100644
--- a/src/os/unix/ngx_posix_init.c
+++ b/src/os/unix/ngx_posix_init.c
@@ -40,7 +40,9 @@ ngx_os_init(ngx_log_t *log)
}
#endif
- ngx_init_setproctitle(log);
+ if (ngx_init_setproctitle(log) != NGX_OK) {
+ return NGX_ERROR;
+ }
ngx_pagesize = getpagesize();
ngx_cacheline_size = NGX_CPU_CACHE_LINE;
diff --git a/src/os/unix/ngx_process_cycle.c b/src/os/unix/ngx_process_cycle.c
index 3205aa555..6c84ba8bd 100644
--- a/src/os/unix/ngx_process_cycle.c
+++ b/src/os/unix/ngx_process_cycle.c
@@ -1214,7 +1214,6 @@ ngx_wakeup_worker_threads(ngx_cycle_t *cycle)
/* STUB */
ngx_done_events(cycle);
ngx_mutex_destroy(ngx_event_timer_mutex);
- ngx_mutex_destroy(ngx_posted_events_mutex);
return;
}
@@ -1265,20 +1264,18 @@ ngx_worker_thread_cycle(void *data)
return (ngx_thread_value_t) 1;
}
- ngx_mutex_lock(ngx_posted_events_mutex);
-
for ( ;; ) {
thr->state = NGX_THREAD_FREE;
+#if 0
if (ngx_cond_wait(thr->cv, ngx_posted_events_mutex) == NGX_ERROR) {
return (ngx_thread_value_t) 1;
}
+#endif
if (ngx_terminate) {
thr->state = NGX_THREAD_EXIT;
- ngx_mutex_unlock(ngx_posted_events_mutex);
-
ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0,
"thread " NGX_TID_T_FMT " is done",
ngx_thread_self());
@@ -1288,6 +1285,7 @@ ngx_worker_thread_cycle(void *data)
thr->state = NGX_THREAD_BUSY;
+#if 0
if (ngx_event_thread_process_posted(cycle) == NGX_ERROR) {
return (ngx_thread_value_t) 1;
}
@@ -1295,6 +1293,7 @@ ngx_worker_thread_cycle(void *data)
if (ngx_event_thread_process_posted(cycle) == NGX_ERROR) {
return (ngx_thread_value_t) 1;
}
+#endif
if (ngx_process_changes) {
if (ngx_process_changes(cycle, 1) == NGX_ERROR) {
diff --git a/src/os/unix/ngx_setproctitle.h b/src/os/unix/ngx_setproctitle.h
index 2323408c4..c3636628b 100644
--- a/src/os/unix/ngx_setproctitle.h
+++ b/src/os/unix/ngx_setproctitle.h
@@ -13,7 +13,7 @@
/* FreeBSD, NetBSD, OpenBSD */
-#define ngx_init_setproctitle(log)
+#define ngx_init_setproctitle(log) NGX_OK
#define ngx_setproctitle(title) setproctitle("%s", title)
@@ -39,7 +39,7 @@ void ngx_setproctitle(char *title);
#else
-#define ngx_init_setproctitle(log)
+#define ngx_init_setproctitle(log) NGX_OK
#define ngx_setproctitle(title)
#endif /* OSes */