mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 09:42:39 +08:00
nginx-0.0.7-2004-07-07-23:48:31 import
This commit is contained in:
parent
2b97993c7a
commit
8e811c11b9
@ -30,6 +30,15 @@ case $USE_THREADS in
|
|||||||
CORE_LIBS="$CORE_LIBS -pthread"
|
CORE_LIBS="$CORE_LIBS -pthread"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
linuxthreads)
|
||||||
|
have=NGX_THREADS . auto/have
|
||||||
|
have=NGX_LINUXTHREADS . auto/have
|
||||||
|
CFLAGS="$CFLAGS -D_THREAD_SAFE"
|
||||||
|
CFLAGS="$CFLAGS -I /usr/local/include/pthread/linuxthreads"
|
||||||
|
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||||
|
CORE_LIBS="$CORE_LIBS -L /usr/local/lib -llthread -llgcc_r"
|
||||||
|
;;
|
||||||
|
|
||||||
lc_r)
|
lc_r)
|
||||||
have=NGX_THREADS . auto/have
|
have=NGX_THREADS . auto/have
|
||||||
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
CORE_SRCS="$CORE_SRCS $PTHREAD_SRCS"
|
||||||
|
@ -41,8 +41,14 @@
|
|||||||
#define NGX_TERMINATE_SIGNAL TERM
|
#define NGX_TERMINATE_SIGNAL TERM
|
||||||
#define NGX_NOACCEPT_SIGNAL WINCH
|
#define NGX_NOACCEPT_SIGNAL WINCH
|
||||||
#define NGX_RECONFIGURE_SIGNAL HUP
|
#define NGX_RECONFIGURE_SIGNAL HUP
|
||||||
|
|
||||||
|
#if (NGX_LINUXTHREADS)
|
||||||
|
#define NGX_REOPEN_SIGNAL INFO
|
||||||
|
#define NGX_CHANGEBIN_SIGNAL XCPU
|
||||||
|
#else
|
||||||
#define NGX_REOPEN_SIGNAL USR1
|
#define NGX_REOPEN_SIGNAL USR1
|
||||||
#define NGX_CHANGEBIN_SIGNAL USR2
|
#define NGX_CHANGEBIN_SIGNAL USR2
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -363,6 +363,9 @@ ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle)
|
|||||||
if (signo == -1) {
|
if (signo == -1) {
|
||||||
err = ngx_errno;
|
err = ngx_errno;
|
||||||
|
|
||||||
|
ngx_log_debug1(NGX_LOG_DEBUG_EVENT, cycle->log, err,
|
||||||
|
"rtsig signo:%d", signo);
|
||||||
|
|
||||||
if (err == NGX_EAGAIN) {
|
if (err == NGX_EAGAIN) {
|
||||||
|
|
||||||
if (timer == NGX_TIMER_INFINITE) {
|
if (timer == NGX_TIMER_INFINITE) {
|
||||||
@ -377,6 +380,9 @@ ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle)
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
err = 0;
|
err = 0;
|
||||||
|
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
||||||
|
"rtsig signo:%d fd:%d band:%X",
|
||||||
|
signo, si.si_fd, si.si_band);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_gettimeofday(&tv);
|
ngx_gettimeofday(&tv);
|
||||||
@ -399,9 +405,6 @@ ngx_int_t ngx_rtsig_process_events(ngx_cycle_t *cycle)
|
|||||||
"rtsig timer: %d, delta: %d", timer, (int) delta);
|
"rtsig timer: %d, delta: %d", timer, (int) delta);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_log_debug3(NGX_LOG_DEBUG_EVENT, cycle->log, 0,
|
|
||||||
"rtsig signo:%d fd:%d band:%X", signo, si.si_fd, si.si_band);
|
|
||||||
|
|
||||||
rtscf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_rtsig_module);
|
rtscf = ngx_event_get_conf(ngx_cycle->conf_ctx, ngx_rtsig_module);
|
||||||
|
|
||||||
if (signo == rtscf->signo || signo == rtscf->signo + 1) {
|
if (signo == rtscf->signo || signo == rtscf->signo + 1) {
|
||||||
|
@ -858,7 +858,7 @@ static void* ngx_worker_thread_cycle(void *data)
|
|||||||
return (void *) 1;
|
return (void *) 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, ngx_errno,
|
ngx_log_debug1(NGX_LOG_DEBUG_CORE, cycle->log, 0,
|
||||||
"thread " TID_T_FMT " started", ngx_thread_self());
|
"thread " TID_T_FMT " started", ngx_thread_self());
|
||||||
|
|
||||||
ngx_setthrtitle("worker thread");
|
ngx_setthrtitle("worker thread");
|
||||||
|
@ -22,7 +22,11 @@ typedef pthread_t ngx_tid_t;
|
|||||||
#define ngx_thread_self() pthread_self()
|
#define ngx_thread_self() pthread_self()
|
||||||
#define ngx_log_tid (int) ngx_thread_self()
|
#define ngx_log_tid (int) ngx_thread_self()
|
||||||
|
|
||||||
|
#if defined(__FreeBSD__) && !defined(NGX_LINUXTHREADS)
|
||||||
#define TID_T_FMT PTR_FMT
|
#define TID_T_FMT PTR_FMT
|
||||||
|
#else
|
||||||
|
#define TID_T_FMT "%d"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
typedef pthread_key_t ngx_tls_key_t;
|
typedef pthread_key_t ngx_tls_key_t;
|
||||||
|
Loading…
Reference in New Issue
Block a user