Mercurial > hg > nginx-vendor-current
annotate src/os/unix/rfork_thread.S @ 126:df17fbafec8f NGINX_0_3_10
nginx 0.3.10
*) Change: the "valid_referers" directive and the "$invalid_referer"
variable were moved to the new ngx_http_referer_module from the
ngx_http_rewrite_module.
*) Change: the "$apache_bytes_sent" variable name was changed to
"$body_bytes_sent".
*) Feature: the "$sent_http_..." variables.
*) Feature: the "if" directive supports the "=" and "!=" operations.
*) Feature: the "proxy_pass" directive supports the HTTPS protocol.
*) Feature: the "proxy_set_body" directive.
*) Feature: the "post_action" directive.
*) Feature: the ngx_http_empty_gif_module.
*) Feature: the "worker_cpu_affinity" directive for Linux.
*) Bugfix: the "rewrite" directive did not unescape URI part in
redirect, now it is unescaped except the %00-%25 and %7F-%FF
characters.
*) Bugfix: nginx could not be built by the icc 9.0 compiler.
*) Bugfix: if the SSI was enabled for zero size static file, then the
chunked response was encoded incorrectly.
author | Igor Sysoev <http://sysoev.ru> |
---|---|
date | Tue, 15 Nov 2005 00:00:00 +0300 |
parents | da8c190bdaba |
children | d0f7a625f27c |
rev | line source |
---|---|
0 | 1 |
2 /* | |
3 * Copyright (C) Igor Sysoev | |
4 */ | |
5 | |
6 | |
7 #include <sys/syscall.h> | |
8 #include <machine/asm.h> | |
9 | |
10 /* | |
11 * rfork_thread(3) - rfork_thread(flags, stack, func, arg); | |
12 */ | |
13 | |
14 #define KERNCALL int $0x80 | |
15 | |
16 ENTRY(rfork_thread) | |
17 push %ebp | |
18 mov %esp, %ebp | |
19 push %esi | |
20 | |
32 | 21 mov 12(%ebp), %esi # the thread stack address |
0 | 22 |
23 sub $4, %esi | |
24 mov 20(%ebp), %eax # the thread argument | |
25 mov %eax, (%esi) | |
26 | |
27 sub $4, %esi | |
32 | 28 mov 16(%ebp), %eax # the thread start address |
0 | 29 mov %eax, (%esi) |
30 | |
31 push 8(%ebp) # rfork(2) flags | |
32 push $0 | |
33 mov $SYS_rfork, %eax | |
34 KERNCALL | |
35 jc error | |
36 | |
37 cmp $0, %edx | |
38 jne child | |
39 | |
40 parent: | |
41 add $8, %esp | |
42 pop %esi | |
32 | 43 leave |
0 | 44 ret |
45 | |
46 child: | |
47 mov %esi, %esp | |
48 pop %eax | |
49 call *%eax # call a thread start address ... | |
50 add $4, %esp | |
51 | |
52 push %eax | |
53 push $0 | |
54 mov $SYS_exit, %eax # ... and exit(2) after a thread would return | |
55 KERNCALL | |
56 | |
57 error: | |
58 add $8, %esp | |
59 pop %esi | |
32 | 60 leave |
0 | 61 PIC_PROLOGUE |
62 | |
63 /* libc's cerror: jmp PIC_PLT(HIDENAME(cerror)) */ | |
64 | |
65 push %eax | |
66 call PIC_PLT(CNAME(__error)) | |
67 pop %ecx | |
68 PIC_EPILOGUE | |
69 mov %ecx, (%eax) | |
70 mov $-1, %eax | |
71 mov $-1, %edx | |
72 ret |