File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ typedef struct {
6060/*
6161 * Signal to unblock thread
6262 */
63- static int sigWakeup = ( __SIGRTMAX - 2 );
63+ #define WAKEUP_SIGNAL (SIGRTMAX - 2)
6464
6565/*
6666 * fdTable holds one entry per file descriptor, up to a certain
@@ -152,10 +152,10 @@ static void __attribute((constructor)) init() {
152152 sa .sa_handler = sig_wakeup ;
153153 sa .sa_flags = 0 ;
154154 sigemptyset (& sa .sa_mask );
155- sigaction (sigWakeup , & sa , NULL );
155+ sigaction (WAKEUP_SIGNAL , & sa , NULL );
156156
157157 sigemptyset (& sigset );
158- sigaddset (& sigset , sigWakeup );
158+ sigaddset (& sigset , WAKEUP_SIGNAL );
159159 sigprocmask (SIG_UNBLOCK , & sigset , NULL );
160160}
161161
@@ -305,7 +305,7 @@ static int closefd(int fd1, int fd2) {
305305 threadEntry_t * curr = fdEntry -> threads ;
306306 while (curr != NULL ) {
307307 curr -> intr = 1 ;
308- pthread_kill ( curr -> thr , sigWakeup );
308+ pthread_kill ( curr -> thr , WAKEUP_SIGNAL );
309309 curr = curr -> next ;
310310 }
311311 }
Original file line number Diff line number Diff line change 3636#ifdef __linux__
3737 #include <pthread.h>
3838 /* Also defined in net/linux_close.c */
39- #define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
39+ #define INTERRUPT_SIGNAL (SIGRTMAX - 2)
4040#elif _AIX
4141 #include <pthread.h>
4242 /* Also defined in net/aix_close.c */
You can’t perform that action at this time.
0 commit comments