Commit 608311e9 authored by Simon Marlow's avatar Simon Marlow
Browse files

fix bugs in tryTakeMVar/tryPutMVar

I'm surprised that these haven't caused any problems (or maybe they have?)
parent 5e578e12
......@@ -1323,7 +1323,7 @@ loop2:
foreign "C" tryWakeupThread_(MyCapability() "ptr", tso) [];
unlockClosure(mvar, stg_MVAR_DIRTY_info);
RET_P(val);
RET_NP(1,val);
}
......@@ -1452,7 +1452,7 @@ loop:
/* No further takes, the MVar is now full. */
StgMVar_value(mvar) = val;
unlockClosure(mvar, stg_MVAR_DIRTY_info);
jump %ENTRY_CODE(Sp(0));
RET_N(1);
}
if (StgHeader_info(q) == stg_IND_info ||
StgHeader_info(q) == stg_MSG_NULL_info) {
......@@ -1490,7 +1490,7 @@ loop2:
foreign "C" tryWakeupThread_(MyCapability() "ptr", tso) [];
unlockClosure(mvar, stg_MVAR_DIRTY_info);
jump %ENTRY_CODE(Sp(0));
RET_N(1);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment