diff options
author | Igor Sysoev <igor@sysoev.ru> | 2003-04-28 15:06:39 +0000 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2003-04-28 15:06:39 +0000 |
commit | 1d8d9eee942ab1d2565048e00d1817147c49f48c (patch) | |
tree | 05b00d2609f9a7264f2356b559353b466d1be0d4 /src/os/unix/freebsd/ngx_rfork_thread.h | |
parent | a09f08dbab9f06b81c1224a32607b26292015c8b (diff) | |
download | nginx-1d8d9eee942ab1d2565048e00d1817147c49f48c.tar.gz nginx-1d8d9eee942ab1d2565048e00d1817147c49f48c.zip |
nginx-0.0.1-2003-04-28-19:06:39 import
Diffstat (limited to 'src/os/unix/freebsd/ngx_rfork_thread.h')
-rw-r--r-- | src/os/unix/freebsd/ngx_rfork_thread.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/os/unix/freebsd/ngx_rfork_thread.h b/src/os/unix/freebsd/ngx_rfork_thread.h index bd500e1a4..2ab114e75 100644 --- a/src/os/unix/freebsd/ngx_rfork_thread.h +++ b/src/os/unix/freebsd/ngx_rfork_thread.h @@ -16,6 +16,7 @@ static inline ngx_tid_t ngx_gettid() char *sp; __asm__ ("mov %%esp,%0" : "=r" (sp)); + return (sp > ngx_stacks_end) ? 0: (sp - ngx_stacks_start) / ngx_stack_size + 1; } |