diff options
Diffstat (limited to 'rts/PrimOps.cmm')
-rw-r--r-- | rts/PrimOps.cmm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/rts/PrimOps.cmm b/rts/PrimOps.cmm index b468c33df6..02a7dafec3 100644 --- a/rts/PrimOps.cmm +++ b/rts/PrimOps.cmm @@ -1739,6 +1739,13 @@ loop: } +// NOTE: there is another implementation of this function in +// Threads.c:performTryPutMVar(). Keep them in sync! It was +// measurably slower to call the C function from here (70% for a +// tight loop doing tryPutMVar#). +// +// TODO: we could kill the duplication by making tryPutMVar# into an +// inline primop that expands into a C call to performTryPutMVar(). stg_tryPutMVarzh ( P_ mvar, /* :: MVar a */ P_ val, /* :: a */ ) { @@ -1812,6 +1819,7 @@ loop: return (1); } + stg_readMVarzh ( P_ mvar, /* :: MVar a */ ) { W_ val, info, tso, q; |