@@ -770,7 +770,7 @@ static address get_signal_handler(const struct sigaction* action) {
770770
771771typedef int (*os_sigaction_t )(int , const struct sigaction *, struct sigaction *);
772772
773- static void SR_handler (int sig, siginfo_t * siginfo, ucontext_t * context );
773+ static void SR_handler (int sig, siginfo_t * siginfo, void * ucVoid );
774774
775775// Semantically compare two sigaction structures. Return true if they are referring to
776776// the same handler, using the same flags.
@@ -1565,8 +1565,8 @@ static void resume_clear_context(OSThread *osthread) {
15651565 osthread->set_siginfo (NULL );
15661566}
15671567
1568- static void suspend_save_context (OSThread *osthread, siginfo_t * siginfo, ucontext_t * context ) {
1569- osthread->set_ucontext (context );
1568+ static void suspend_save_context (OSThread *osthread, siginfo_t * siginfo, void * ucVoid ) {
1569+ osthread->set_ucontext (( ucontext_t *)ucVoid );
15701570 osthread->set_siginfo (siginfo);
15711571}
15721572
@@ -1583,7 +1583,7 @@ static void suspend_save_context(OSThread *osthread, siginfo_t* siginfo, ucontex
15831583//
15841584// Currently only ever called on the VMThread and JavaThreads (PC sampling)
15851585//
1586- static void SR_handler (int sig, siginfo_t * siginfo, ucontext_t * context ) {
1586+ static void SR_handler (int sig, siginfo_t * siginfo, void * ucVoid ) {
15871587
15881588 // Save and restore errno to avoid confusing native code with EINTR
15891589 // after sigsuspend.
@@ -1611,7 +1611,7 @@ static void SR_handler(int sig, siginfo_t* siginfo, ucontext_t* context) {
16111611 os::SuspendResume::State current = osthread->sr .state ();
16121612
16131613 if (current == os::SuspendResume::SR_SUSPEND_REQUEST) {
1614- suspend_save_context (osthread, siginfo, context );
1614+ suspend_save_context (osthread, siginfo, ucVoid );
16151615
16161616 // attempt to switch the state, we assume we had a SUSPEND_REQUEST
16171617 os::SuspendResume::State state = osthread->sr .suspended ();
@@ -1680,7 +1680,7 @@ int SR_initialize() {
16801680
16811681 // Set up signal handler for suspend/resume
16821682 act.sa_flags = SA_RESTART|SA_SIGINFO;
1683- act.sa_handler = ( void (*)( int )) SR_handler;
1683+ act.sa_sigaction = SR_handler;
16841684
16851685 // SR_signum is blocked by default.
16861686 pthread_sigmask (SIG_BLOCK, NULL , &act.sa_mask );
0 commit comments