Skip to content

Commit

Permalink
Fix formatting and consistently use tracepoints for omrsig_can_protect
Browse files Browse the repository at this point in the history
Tracepoints have been consistently introduced in each platform
implementation of omrsig_can_protect.

Signed-off-by: Babneet Singh <sbabneet@ca.ibm.com>
  • Loading branch information
babsingh committed Jun 10, 2019
1 parent d7921df commit 3716183
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 14 deletions.
6 changes: 3 additions & 3 deletions port/unix/omrsignal.c
Expand Up @@ -278,10 +278,10 @@ omrsig_can_protect(struct OMRPortLibrary *portLibrary, uint32_t flags)
if (OMR_ARE_ALL_BITS_SET(supportedFlags, flags)) {
Trc_PRT_signal_omrsig_can_protect_exiting_is_able_to_protect(supportedFlags);
return 1;
} else {
Trc_PRT_signal_omrsig_can_protect_exiting_is_not_able_to_protect(supportedFlags);
return 0;
}

Trc_PRT_signal_omrsig_can_protect_exiting_is_not_able_to_protect(supportedFlags);
return 0;
}

uint32_t
Expand Down
12 changes: 8 additions & 4 deletions port/win32/omrsignal.c
Expand Up @@ -398,15 +398,19 @@ omrsig_can_protect(struct OMRPortLibrary *portLibrary, uint32_t flags)
{
uint32_t supportedFlags = OMRPORT_SIG_FLAG_MAY_RETURN | OMRPORT_SIG_FLAG_MAY_CONTINUE_EXECUTION;

if (0 == (signalOptions & OMRPORT_SIG_OPTIONS_REDUCED_SIGNALS_SYNCHRONOUS)) {
Trc_PRT_signal_omrsig_can_protect_entered(flags);

if (OMR_ARE_NO_BITS_SET(signalOptions, OMRPORT_SIG_OPTIONS_REDUCED_SIGNALS_SYNCHRONOUS)) {
supportedFlags |= OMRPORT_SIG_FLAG_SIGALLSYNC;
}

if ((flags & supportedFlags) == flags) {
if (OMR_ARE_ALL_BITS_SET(supportedFlags, flags)) {
Trc_PRT_signal_omrsig_can_protect_exiting_is_able_to_protect(supportedFlags);
return 1;
} else {
return 0;
}

Trc_PRT_signal_omrsig_can_protect_exiting_is_not_able_to_protect(supportedFlags);
return 0;
}


Expand Down
12 changes: 8 additions & 4 deletions port/win64amd/omrsignal.c
Expand Up @@ -519,15 +519,19 @@ omrsig_can_protect(struct OMRPortLibrary *portLibrary, uint32_t flags)
{
uint32_t supportedFlags = OMRPORT_SIG_FLAG_MAY_RETURN | OMRPORT_SIG_FLAG_MAY_CONTINUE_EXECUTION;

if (0 == (signalOptions & OMRPORT_SIG_OPTIONS_REDUCED_SIGNALS_SYNCHRONOUS)) {
Trc_PRT_signal_omrsig_can_protect_entered(flags);

if (OMR_ARE_NO_BITS_SET(signalOptions, OMRPORT_SIG_OPTIONS_REDUCED_SIGNALS_SYNCHRONOUS)) {
supportedFlags |= OMRPORT_SIG_FLAG_SIGALLSYNC;
}

if ((flags & supportedFlags) == flags) {
if (OMR_ARE_ALL_BITS_SET(supportedFlags, flags)) {
Trc_PRT_signal_omrsig_can_protect_exiting_is_able_to_protect(supportedFlags);
return 1;
} else {
return 0;
}

Trc_PRT_signal_omrsig_can_protect_exiting_is_not_able_to_protect(supportedFlags);
return 0;
}


Expand Down
6 changes: 3 additions & 3 deletions port/ztpf/omrsignal.c
Expand Up @@ -308,10 +308,10 @@ omrsig_can_protect(struct OMRPortLibrary *portLibrary, uint32_t flags)
if (OMR_ARE_ALL_BITS_SET(supportedFlags, flags)) {
Trc_PRT_signal_omrsig_can_protect_exiting_is_able_to_protect(supportedFlags);
return 1;
} else {
Trc_PRT_signal_omrsig_can_protect_exiting_is_not_able_to_protect(supportedFlags);
return 0;
}

Trc_PRT_signal_omrsig_can_protect_exiting_is_not_able_to_protect(supportedFlags);
return 0;
}

uint32_t
Expand Down

0 comments on commit 3716183

Please sign in to comment.