Mercurial > hg > nginx-quic
diff src/os/win32/ngx_thread.c @ 4571:2942a827da09
Win32: improved ngx_mutex_init() stub (ticket #138).
This allows to run nginx with "master_process off" under Windows.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Mon, 02 Apr 2012 21:31:45 +0000 |
parents | d620f497c50f |
children | 94ce52db3367 |
line wrap: on
line diff
--- a/src/os/win32/ngx_thread.c +++ b/src/os/win32/ngx_thread.c @@ -72,7 +72,18 @@ ngx_thread_set_tls(ngx_tls_key_t *key, v ngx_mutex_t * ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags) { - return (ngx_mutex_t *) 1; + ngx_mutex_t *m; + + m = ngx_alloc(sizeof(ngx_mutex_t), log); + if (m == NULL) { + return NULL; + } + + m->log = log; + + /* STUB */ + + return m; }