Removed stub implementation of win32 mutexes.
diff --git a/src/core/ngx_connection.c b/src/core/ngx_connection.c index 9152af3..9f8fbc3 100644 --- a/src/core/ngx_connection.c +++ b/src/core/ngx_connection.c
@@ -835,8 +835,6 @@ return NULL; } - /* ngx_mutex_lock */ - c = ngx_cycle->free_connections; if (c == NULL) { @@ -849,16 +847,12 @@ "%ui worker_connections are not enough", ngx_cycle->connection_n); - /* ngx_mutex_unlock */ - return NULL; } ngx_cycle->free_connections = c->data; ngx_cycle->free_connection_n--; - /* ngx_mutex_unlock */ - if (ngx_cycle->files) { ngx_cycle->files[s] = c; } @@ -896,14 +890,10 @@ void ngx_free_connection(ngx_connection_t *c) { - /* ngx_mutex_lock */ - c->data = ngx_cycle->free_connections; ngx_cycle->free_connections = c; ngx_cycle->free_connection_n++; - /* ngx_mutex_unlock */ - if (ngx_cycle->files) { ngx_cycle->files[c->fd] = NULL; }
diff --git a/src/http/ngx_http_upstream_round_robin.h b/src/http/ngx_http_upstream_round_robin.h index 9db82a6..3bbba0b 100644 --- a/src/http/ngx_http_upstream_round_robin.h +++ b/src/http/ngx_http_upstream_round_robin.h
@@ -44,8 +44,6 @@ struct ngx_http_upstream_rr_peers_s { ngx_uint_t number; - /* ngx_mutex_t *mutex; */ - ngx_uint_t total_weight; unsigned single:1;
diff --git a/src/os/win32/ngx_thread.c b/src/os/win32/ngx_thread.c index 1bdd6d2..3255e01 100644 --- a/src/os/win32/ngx_thread.c +++ b/src/os/win32/ngx_thread.c
@@ -67,44 +67,3 @@ return 0; } - - -ngx_mutex_t * -ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags) -{ - ngx_mutex_t *m; - - m = ngx_alloc(sizeof(ngx_mutex_t), log); - if (m == NULL) { - return NULL; - } - - m->log = log; - - /* STUB */ - - return m; -} - - -/* STUB */ - -void -ngx_mutex_lock(ngx_mutex_t *m) { - return; -} - - - -ngx_int_t -ngx_mutex_trylock(ngx_mutex_t *m) { - return NGX_OK; -} - - -void -ngx_mutex_unlock(ngx_mutex_t *m) { - return; -} - -/**/
diff --git a/src/os/win32/ngx_thread.h b/src/os/win32/ngx_thread.h index c23c809..e1d0a7e 100644 --- a/src/os/win32/ngx_thread.h +++ b/src/os/win32/ngx_thread.h
@@ -18,12 +18,6 @@ typedef DWORD ngx_thread_value_t; -typedef struct { - HANDLE mutex; - ngx_log_t *log; -} ngx_mutex_t; - - ngx_err_t ngx_create_thread(ngx_tid_t *tid, ngx_thread_value_t (__stdcall *func)(void *arg), void *arg, ngx_log_t *log); ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle); @@ -34,25 +28,10 @@ #define ngx_thread_set_tls_n "TlsSetValue()" #define ngx_thread_get_tls TlsGetValue - -#define ngx_thread_volatile volatile - #define ngx_log_tid GetCurrentThreadId() #define NGX_TID_T_FMT "%ud" -ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags); - -void ngx_mutex_lock(ngx_mutex_t *m); -ngx_int_t ngx_mutex_trylock(ngx_mutex_t *m); -void ngx_mutex_unlock(ngx_mutex_t *m); - - -/* STUB */ -#define NGX_MUTEX_LIGHT 0 -/**/ - - extern ngx_int_t ngx_threads_n;