8252248: __SIGRTMAX is not declared in musl libc
Reviewed-by: alanb, vtewari, stuefe
This commit is contained in:
parent
b957d802e6
commit
5490b03160
@ -60,7 +60,7 @@ typedef struct {
|
||||
/*
|
||||
* Signal to unblock thread
|
||||
*/
|
||||
static int sigWakeup = (__SIGRTMAX - 2);
|
||||
#define WAKEUP_SIGNAL (SIGRTMAX - 2)
|
||||
|
||||
/*
|
||||
* fdTable holds one entry per file descriptor, up to a certain
|
||||
@ -152,10 +152,10 @@ static void __attribute((constructor)) init() {
|
||||
sa.sa_handler = sig_wakeup;
|
||||
sa.sa_flags = 0;
|
||||
sigemptyset(&sa.sa_mask);
|
||||
sigaction(sigWakeup, &sa, NULL);
|
||||
sigaction(WAKEUP_SIGNAL, &sa, NULL);
|
||||
|
||||
sigemptyset(&sigset);
|
||||
sigaddset(&sigset, sigWakeup);
|
||||
sigaddset(&sigset, WAKEUP_SIGNAL);
|
||||
sigprocmask(SIG_UNBLOCK, &sigset, NULL);
|
||||
}
|
||||
|
||||
@ -305,7 +305,7 @@ static int closefd(int fd1, int fd2) {
|
||||
threadEntry_t *curr = fdEntry->threads;
|
||||
while (curr != NULL) {
|
||||
curr->intr = 1;
|
||||
pthread_kill( curr->thr, sigWakeup );
|
||||
pthread_kill( curr->thr, WAKEUP_SIGNAL);
|
||||
curr = curr->next;
|
||||
}
|
||||
}
|
||||
|
@ -32,17 +32,15 @@
|
||||
#include "sun_nio_ch_NativeThread.h"
|
||||
#include "nio_util.h"
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
|
||||
#ifdef __linux__
|
||||
#include <pthread.h>
|
||||
/* Also defined in net/linux_close.c */
|
||||
#define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
|
||||
#define INTERRUPT_SIGNAL (SIGRTMAX - 2)
|
||||
#elif defined(_AIX)
|
||||
#include <pthread.h>
|
||||
/* Also defined in net/aix_close.c */
|
||||
#define INTERRUPT_SIGNAL (SIGRTMAX - 1)
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
#include <pthread.h>
|
||||
/* Also defined in net/bsd_close.c */
|
||||
#define INTERRUPT_SIGNAL SIGIO
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user