comparison src/os/win32/ngx_thread.h @ 461:a88a3e4e158f release-0.1.5

nginx-0.1.5-RELEASE import *) 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.
author Igor Sysoev <igor@sysoev.ru>
date Thu, 11 Nov 2004 14:07:14 +0000
parents 42d11f017717
children d4ea69372b94
comparison
equal deleted inserted replaced
460:5f8319142dfc 461:a88a3e4e158f
10 10
11 #include <ngx_config.h> 11 #include <ngx_config.h>
12 #include <ngx_core.h> 12 #include <ngx_core.h>
13 13
14 14
15 #if (NGX_THREADS) 15 typedef HANDLE ngx_tid_t;
16 typedef DWORD ngx_tls_key_t;
17
18
19 typedef struct {
20 HANDLE mutex;
21 ngx_log_t *log;
22 } ngx_mutex_t;
23
24
25 ngx_err_t ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg), void *arg,
26 ngx_log_t *log);
27 ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle);
28
29 ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key);
30 #define ngx_thread_key_create_n "TlsAlloc()"
31 ngx_err_t ngx_thread_set_tls(ngx_tls_key_t *key, void *data);
32 #define ngx_thread_set_tls_n "TlsSetValue()"
33 #define ngx_thread_get_tls TlsGetValue
34
16 35
17 #define ngx_thread_volatile volatile 36 #define ngx_thread_volatile volatile
18 37
19 #else /* !NGX_THREADS */ 38 #define ngx_log_tid GetCurrentThreadId()
39 #define NGX_TID_T_FMT "%ud"
20 40
21 #define ngx_thread_volatile
22 41
23 #define ngx_log_tid 0 42 ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags);
24 #define TID_T_FMT "%d"
25 43
26 #define ngx_mutex_lock(m) NGX_OK 44
45 /* STUB */
46 #define NGX_MUTEX_LIGHT 0
47
48 #define ngx_mutex_lock(m) NGX_OK
49 #define ngx_mutex_trylock(m) NGX_OK
27 #define ngx_mutex_unlock(m) 50 #define ngx_mutex_unlock(m)
51 /* */
28 52
29 #endif 53
54 extern ngx_int_t ngx_threads_n;
30 55
31 56
32 #endif /* _NGX_THREAD_H_INCLUDED_ */ 57 #endif /* _NGX_THREAD_H_INCLUDED_ */