/* ToDo: currently this is a hack. Would be much better if
* the info was only displayed for an *uncaught* exception.
*/
- if (RtsFlags_ProfFlags_showCCSOnException(RtsFlags)) {
+ if (RtsFlags_ProfFlags_showCCSOnException(RtsFlags) != 0) {
foreign "C" fprintCCS_stderr(W_[CCCS] "ptr");
}
#endif
r = foreign "C" stmValidateNestOfTransactions(trec "ptr");
foreign "C" stmAbortTransaction(MyCapability() "ptr", trec "ptr");
StgTSO_trec(CurrentTSO) = NO_TREC;
- if (r) {
+ if (r != 0) {
// Transaction was valid: continue searching for a catch frame
Sp = Sp + SIZEOF_StgAtomicallyFrame;
goto retry_pop_stack;
trec = StgTSO_trec(CurrentTSO);
"ptr" outer = foreign "C" stmGetEnclosingTRec(trec "ptr") [];
r = foreign "C" stmCommitNestedTransaction(MyCapability() "ptr", trec "ptr") [];
- if (r) {
+ if (r != 0) {
/* Succeeded (either first branch or second branch) */
StgTSO_trec(CurrentTSO) = outer;
Sp = Sp + SIZEOF_StgCatchRetryFrame;
W_ new_trec;
"ptr" new_trec = foreign "C" stmStartTransaction(MyCapability() "ptr", outer "ptr") [];
StgTSO_trec(CurrentTSO) = new_trec;
- if (StgCatchRetryFrame_running_alt_code(frame)) {
+ if (StgCatchRetryFrame_running_alt_code(frame) != 0::I32) {
R1 = StgCatchRetryFrame_alt_code(frame);
} else {
R1 = StgCatchRetryFrame_first_code(frame);
/* The TSO is not currently waiting: try to commit the transaction */
valid = foreign "C" stmCommitTransaction(MyCapability() "ptr", trec "ptr") [];
- if (valid) {
+ if (valid != 0) {
/* Transaction was valid: commit succeeded */
StgTSO_trec(CurrentTSO) = NO_TREC;
Sp = Sp + SIZEOF_StgAtomicallyFrame;
/* The TSO is currently waiting: should we stop waiting? */
valid = foreign "C" stmReWait(MyCapability() "ptr", CurrentTSO "ptr") [];
- if (valid) {
+ if (valid != 0) {
/* Previous attempt is still valid: no point trying again yet */
IF_NOT_REG_R1(Sp_adj(-2);
Sp(1) = stg_NO_FINALIZER_closure;
if (frame_type == CATCH_RETRY_FRAME) {
// The retry reaches a CATCH_RETRY_FRAME before the atomic frame
ASSERT(outer != NO_TREC);
- if (!StgCatchRetryFrame_running_alt_code(frame)) {
+ if (!StgCatchRetryFrame_running_alt_code(frame) != 0::I32) {
// Retry in the first code: try the alternative
"ptr" trec = foreign "C" stmStartTransaction(MyCapability() "ptr", outer "ptr") [];
StgTSO_trec(CurrentTSO) = trec;
W_ other_trec;
other_trec = StgCatchRetryFrame_first_code_trec(frame);
r = foreign "C" stmCommitNestedTransaction(MyCapability() "ptr", other_trec "ptr") [];
- if (r) {
+ if (r != 0) {
r = foreign "C" stmCommitNestedTransaction(MyCapability() "ptr", trec "ptr") [];
} else {
foreign "C" stmAbortTransaction(MyCapability() "ptr", trec "ptr") [];
}
- if (r) {
+ if (r != 0) {
// Merge between siblings succeeded: commit it back to enclosing transaction
// and then propagate the retry
StgTSO_trec(CurrentTSO) = outer;
ASSERT(frame_type == ATOMICALLY_FRAME);
ASSERT(outer == NO_TREC);
r = foreign "C" stmWait(MyCapability() "ptr", CurrentTSO "ptr", trec "ptr") [];
- if (r) {
+ if (r != 0) {
// Transaction was valid: stmWait put us on the TVars' queues, we now block
StgHeader_info(frame) = stg_atomically_waiting_frame_info;
Sp = frame;