Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/java.base/linux/native/libnet/linux_close.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}

Expand Down Expand Up @@ -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;
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/java.base/unix/native/libnio/ch/NativeThread.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down