Skip to content
Permalink
Browse files
8252248: __SIGRTMAX is not declared in musl libc
Reviewed-by: stuefe
Backport-of: 5490b03
  • Loading branch information
Aleksei Voitylov authored and Alexander Scherbatiy committed Mar 10, 2022
1 parent 49f9105 commit e18126a2b92b14ddc134d303c30cef5450cc87d8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
@@ -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;
}
}
@@ -36,7 +36,7 @@
#ifdef __linux__
#include <pthread.h>
/* Also defined in net/linux_close.c */
#define INTERRUPT_SIGNAL (__SIGRTMAX - 2)
#define INTERRUPT_SIGNAL (SIGRTMAX - 2)
#elif _AIX
#include <pthread.h>
/* Also defined in net/aix_close.c */

1 comment on commit e18126a

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.