diff options
author | Igor Sysoev <igor@sysoev.ru> | 2004-11-11 14:07:14 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2004-11-11 14:07:14 +0000 |
commit | 1b73583ba2c0e4b72d951218827e0c621427d389 (patch) | |
tree | 9e4d204e2cce91560d5cb8908b8a1a9f2c1d92ee /src/os/win32/ngx_thread.h | |
parent | d6f24959428caed68a509a19ca4fd866d978a69c (diff) | |
download | nginx-1b73583ba2c0e4b72d951218827e0c621427d389.tar.gz nginx-1b73583ba2c0e4b72d951218827e0c621427d389.zip |
nginx-0.1.5-RELEASE importrelease-0.1.5
*) Bugfix: on Solaris and Linux there may be too many "recvmsg()
returned not enough data" alerts.
*) Bugfix: there were the "writev() failed (22: Invalid argument)"
errors on Solaris in proxy mode without sendfile. On other platforms
that do not support sendfile at all the process got caught in an
endless loop.
*) Bugfix: segmentation fault on Solaris in proxy mode and using
sendfile.
*) Bugfix: segmentation fault on Solaris.
*) Bugfix: on-line upgrade did not work on Linux.
*) Bugfix: the ngx_http_autoindex_module module did not escape the
spaces, the quotes, and the percent signs in the directory listing.
*) Change: the decrease of the copy operations.
*) Feature: the userid_p3p directive.
Diffstat (limited to 'src/os/win32/ngx_thread.h')
-rw-r--r-- | src/os/win32/ngx_thread.h | 39 |
1 files changed, 32 insertions, 7 deletions
diff --git a/src/os/win32/ngx_thread.h b/src/os/win32/ngx_thread.h index b3b6e67cd..5b3c4da98 100644 --- a/src/os/win32/ngx_thread.h +++ b/src/os/win32/ngx_thread.h @@ -12,21 +12,46 @@ #include <ngx_core.h> -#if (NGX_THREADS) +typedef HANDLE ngx_tid_t; +typedef DWORD ngx_tls_key_t; + + +typedef struct { + HANDLE mutex; + ngx_log_t *log; +} ngx_mutex_t; + + +ngx_err_t ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg), void *arg, + ngx_log_t *log); +ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle); + +ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key); +#define ngx_thread_key_create_n "TlsAlloc()" +ngx_err_t ngx_thread_set_tls(ngx_tls_key_t *key, void *data); +#define ngx_thread_set_tls_n "TlsSetValue()" +#define ngx_thread_get_tls TlsGetValue + #define ngx_thread_volatile volatile -#else /* !NGX_THREADS */ +#define ngx_log_tid GetCurrentThreadId() +#define NGX_TID_T_FMT "%ud" + -#define ngx_thread_volatile +ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags); -#define ngx_log_tid 0 -#define TID_T_FMT "%d" -#define ngx_mutex_lock(m) NGX_OK +/* STUB */ +#define NGX_MUTEX_LIGHT 0 + +#define ngx_mutex_lock(m) NGX_OK +#define ngx_mutex_trylock(m) NGX_OK #define ngx_mutex_unlock(m) +/* */ + -#endif +extern ngx_int_t ngx_threads_n; #endif /* _NGX_THREAD_H_INCLUDED_ */ |