Mercurial > hg > nginx-vendor-0-6
comparison src/os/unix/ngx_thread.h @ 10:46833bd150cb NGINX_0_1_5
nginx 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.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 11 Nov 2004 00:00:00 +0300 |
parents | 4b2dafa26fe2 |
children | 6f8b0dc0f8dd |
comparison
equal
deleted
inserted
replaced
9:77eee314ddbd | 10:46833bd150cb |
---|---|
27 | 27 |
28 #define ngx_thread_self() pthread_self() | 28 #define ngx_thread_self() pthread_self() |
29 #define ngx_log_tid (int) ngx_thread_self() | 29 #define ngx_log_tid (int) ngx_thread_self() |
30 | 30 |
31 #if (NGX_FREEBSD) && !(NGX_LINUXTHREADS) | 31 #if (NGX_FREEBSD) && !(NGX_LINUXTHREADS) |
32 #define TID_T_FMT PTR_FMT | 32 #define NGX_TID_T_FMT "%p" |
33 #else | 33 #else |
34 #define TID_T_FMT "%d" | 34 #define NGX_TID_T_FMT "%d" |
35 #endif | 35 #endif |
36 | 36 |
37 | 37 |
38 typedef pthread_key_t ngx_tls_key_t; | 38 typedef pthread_key_t ngx_tls_key_t; |
39 | 39 |
90 extern ngx_int_t ngx_threads_n; | 90 extern ngx_int_t ngx_threads_n; |
91 extern volatile ngx_thread_t ngx_threads[NGX_MAX_THREADS]; | 91 extern volatile ngx_thread_t ngx_threads[NGX_MAX_THREADS]; |
92 | 92 |
93 | 93 |
94 ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle); | 94 ngx_int_t ngx_init_threads(int n, size_t size, ngx_cycle_t *cycle); |
95 int ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg), void *arg, | 95 ngx_err_t ngx_create_thread(ngx_tid_t *tid, void* (*func)(void *arg), void *arg, |
96 ngx_log_t *log); | 96 ngx_log_t *log); |
97 | 97 |
98 | 98 |
99 ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, uint flags); | 99 ngx_mutex_t *ngx_mutex_init(ngx_log_t *log, ngx_uint_t flags); |
100 void ngx_mutex_destroy(ngx_mutex_t *m); | 100 void ngx_mutex_destroy(ngx_mutex_t *m); |
101 | 101 |
102 | 102 |
103 ngx_cond_t *ngx_cond_init(ngx_log_t *log); | 103 ngx_cond_t *ngx_cond_init(ngx_log_t *log); |
104 void ngx_cond_destroy(ngx_cond_t *cv); | 104 void ngx_cond_destroy(ngx_cond_t *cv); |
108 | 108 |
109 #else /* !NGX_THREADS */ | 109 #else /* !NGX_THREADS */ |
110 | 110 |
111 #define ngx_thread_volatile | 111 #define ngx_thread_volatile |
112 | 112 |
113 #define ngx_log_tid 0 | 113 #define ngx_log_tid 0 |
114 #define TID_T_FMT "%d" | 114 #define NGX_TID_T_FMT "%d" |
115 | 115 |
116 #define ngx_mutex_trylock(m) NGX_OK | 116 #define ngx_mutex_trylock(m) NGX_OK |
117 #define ngx_mutex_lock(m) NGX_OK | 117 #define ngx_mutex_lock(m) NGX_OK |
118 #define ngx_mutex_unlock(m) | 118 #define ngx_mutex_unlock(m) |
119 | 119 |