Commit fb8c1b80 authored by Simon Marlow's avatar Simon Marlow
Browse files

add new primop: asyncExceptionsBlocked# :: IO Bool

parent 80d2e6f7
......@@ -1279,6 +1279,11 @@ primop UnblockAsyncExceptionsOp "unblockAsyncExceptions#" GenPrimOp
with
out_of_line = True
primop AsyncExceptionsBlockedOp "asyncExceptionsBlocked#" GenPrimOp
State# RealWorld -> (# State# RealWorld, Int# #)
with
out_of_line = True
------------------------------------------------------------------------
section "STM-accessible Mutable Variables"
------------------------------------------------------------------------
......
......@@ -579,6 +579,7 @@ RTS_FUN(forkzh_fast);
RTS_FUN(forkOnzh_fast);
RTS_FUN(yieldzh_fast);
RTS_FUN(killThreadzh_fast);
RTS_FUN(asyncExceptionsBlockedzh_fast);
RTS_FUN(blockAsyncExceptionszh_fast);
RTS_FUN(unblockAsyncExceptionszh_fast);
RTS_FUN(myThreadIdzh_fast);
......
......@@ -200,6 +200,15 @@ unblockAsyncExceptionszh_fast
jump stg_ap_v_fast;
}
asyncExceptionsBlockedzh_fast
{
/* args: none */
if ((TO_W_(StgTSO_flags(CurrentTSO)) & TSO_BLOCKEX) != 0) {
RET_N(1);
} else {
RET_N(0);
}
}
killThreadzh_fast
{
......
......@@ -547,6 +547,7 @@ typedef struct _RtsSymbolVal {
SymX(barf) \
SymX(debugBelch) \
SymX(errorBelch) \
SymX(asyncExceptionsBlockedzh_fast) \
SymX(blockAsyncExceptionszh_fast) \
SymX(catchzh_fast) \
SymX(catchRetryzh_fast) \
......
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