Mercurial > hg > nginx-vendor-current
annotate src/os/unix/ngx_freebsd_rfork_thread.h @ 58:b55cbf18157e NGINX_0_1_29
nginx 0.1.29
*) Feature: the ngx_http_ssi_module supports "include virtual" command.
*) Feature: the ngx_http_ssi_module supports the condition command like
'if expr="$NAME"' and "else" and "endif" commands. Only one nested
level is supported.
*) Feature: the ngx_http_ssi_module supports the DATE_LOCAL and
DATE_GMT variables and "config timefmt" command.
*) Feature: the "ssi_ignore_recycled_buffers" directive.
*) Bugfix: the "echo" command did not show the default value for the
empty QUERY_STRING variable.
*) Change: the ngx_http_proxy_module was rewritten.
*) Feature: the "proxy_redirect", "proxy_pass_request_headers",
"proxy_pass_request_body", and "proxy_method" directives.
*) Feature: the "proxy_set_header" directive. The "proxy_x_var" was
canceled and must be replaced with the proxy_set_header directive.
*) Change: the "proxy_preserve_host" is canceled and must be replaced
with the "proxy_set_header Host $host" and the "proxy_redirect off"
directives, the "proxy_set_header Host $host:$proxy_port" directive
and the appropriate proxy_redirect directives.
*) Change: the "proxy_set_x_real_ip" is canceled and must be replaced
with the "proxy_set_header X-Real-IP $remote_addr" directive.
*) Change: the "proxy_add_x_forwarded_for" is canceled and must be
replaced with
the "proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for"
directive.
*) Change: the "proxy_set_x_url" is canceled and must be replaced with
the "proxy_set_header X-URL http://$host:$server_port$request_uri"
directive.
*) Feature: the "fastcgi_param" directive.
*) Change: the "fastcgi_root", "fastcgi_set_var" and "fastcgi_params"
directive are canceled and must be replaced with the fastcgi_param
directives.
*) Feature: the "index" directive can use the variables.
*) Feature: the "index" directive can be used at http and server levels.
*) Change: the last index only in the "index" directive can be absolute.
*) Feature: the "rewrite" directive can use the variables.
*) Feature: the "internal" directive.
*) Feature: the CONTENT_LENGTH, CONTENT_TYPE, REMOTE_PORT, SERVER_ADDR,
SERVER_PORT, SERVER_PROTOCOL, DOCUMENT_ROOT, SERVER_NAME,
REQUEST_METHOD, REQUEST_URI, and REMOTE_USER variables.
*) Change: nginx now passes the invalid lines in a client request
headers or a backend response header.
*) Bugfix: if the backend did not transfer response for a long time and
the "send_timeout" was less than "proxy_read_timeout", then nginx
returned the 408 response.
*) Bugfix: the segmentation fault was occurred if the backend sent an
invalid line in response header; bug appeared in 0.1.26.
*) Bugfix: the segmentation fault may occurred in FastCGI fault
tolerance configuration.
*) Bugfix: the "expires" directive did not remove the previous
"Expires" and "Cache-Control" headers.
*) Bugfix: nginx did not take into account trailing dot in "Host"
header line.
*) Bugfix: the ngx_http_auth_module did not work under Linux.
*) Bugfix: the rewrite directive worked incorrectly, if the arguments
were in a request.
*) Bugfix: nginx could not be built on MacOS X.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Thu, 12 May 2005 00:00:00 +0400 |
parents | 72eb30262aac |
children | cf3d6edb3ad6 |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #ifndef _NGX_FREEBSD_RFORK_THREAD_H_INCLUDED_ | |
8 #define _NGX_FREEBSD_RFORK_THREAD_H_INCLUDED_ | |
9 | |
10 | |
11 #include <sys/ipc.h> | |
12 #include <sys/sem.h> | |
13 #include <sched.h> | |
14 | |
15 typedef pid_t ngx_tid_t; | |
16 | |
17 #undef ngx_log_pid | |
18 #define ngx_log_pid ngx_thread_self() | |
19 #define ngx_log_tid 0 | |
20 | |
10 | 21 #define NGX_TID_T_FMT "%P" |
0 | 22 |
23 | |
24 #define NGX_MUTEX_LIGHT 1 | |
25 | |
26 #define NGX_MUTEX_LOCK_BUSY 0x80000000 | |
27 | |
28 typedef volatile struct { | |
29 ngx_atomic_t lock; | |
30 ngx_log_t *log; | |
31 int semid; | |
32 } ngx_mutex_t; | |
33 | |
34 | |
35 #define NGX_CV_SIGNAL 64 | |
36 | |
37 typedef struct { | |
38 int signo; | |
39 int kq; | |
40 ngx_tid_t tid; | |
41 ngx_log_t *log; | |
42 } ngx_cond_t; | |
43 | |
44 | |
45 #define ngx_thread_sigmask(how, set, oset) \ | |
46 (sigprocmask(how, set, oset) == -1) ? ngx_errno : 0 | |
47 | |
48 #define ngx_thread_sigmask_n "sigprocmask()" | |
49 | |
50 #define ngx_thread_join(t, p) | |
51 | |
52 #define ngx_setthrtitle(n) setproctitle(n) | |
53 | |
54 | |
55 extern char *ngx_freebsd_kern_usrstack; | |
56 extern size_t ngx_thread_stack_size; | |
57 | |
58 | |
50 | 59 static ngx_inline ngx_int_t ngx_gettid() |
0 | 60 { |
61 char *sp; | |
62 | |
63 if (ngx_thread_stack_size == 0) { | |
64 return 0; | |
65 } | |
66 | |
67 #if ( __i386__ ) | |
68 | |
69 __asm__ volatile ("mov %%esp, %0" : "=q" (sp)); | |
70 | |
71 #elif ( __amd64__ ) | |
72 | |
73 __asm__ volatile ("mov %%rsp, %0" : "=q" (sp)); | |
74 | |
75 #else | |
76 | |
77 #error "rfork()ed threads are not supported on this platform" | |
78 | |
79 #endif | |
80 | |
81 return (ngx_freebsd_kern_usrstack - sp) / ngx_thread_stack_size; | |
82 } | |
83 | |
84 | |
85 ngx_tid_t ngx_thread_self(); | |
86 | |
87 | |
88 typedef ngx_uint_t ngx_tls_key_t; | |
89 | |
90 #define NGX_THREAD_KEYS_MAX 16 | |
91 | |
92 extern void **ngx_tls; | |
93 | |
10 | 94 ngx_err_t ngx_thread_key_create(ngx_tls_key_t *key); |
0 | 95 #define ngx_thread_key_create_n "the tls key creation" |
96 | |
10 | 97 ngx_err_t ngx_thread_set_tls(ngx_tls_key_t key, void *value); |
0 | 98 #define ngx_thread_set_tls_n "the tls key setting" |
99 | |
100 | |
101 static void *ngx_thread_get_tls(ngx_tls_key_t key) | |
102 { | |
103 if (key >= NGX_THREAD_KEYS_MAX) { | |
104 return NULL; | |
105 } | |
106 | |
107 return ngx_tls[key * NGX_THREAD_KEYS_MAX + ngx_gettid()]; | |
108 } | |
109 | |
110 | |
111 #define ngx_mutex_trylock(m) ngx_mutex_dolock(m, 1) | |
112 #define ngx_mutex_lock(m) ngx_mutex_dolock(m, 0) | |
113 ngx_int_t ngx_mutex_dolock(ngx_mutex_t *m, ngx_int_t try); | |
114 ngx_int_t ngx_mutex_unlock(ngx_mutex_t *m); | |
115 | |
116 | |
117 typedef int (*ngx_rfork_thread_func_pt)(void *arg); | |
118 | |
119 | |
120 | |
121 #endif /* _NGX_FREEBSD_RFORK_THREAD_H_INCLUDED_ */ |