summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libraries/base/System/Posix/Internals.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/libraries/base/System/Posix/Internals.hs b/libraries/base/System/Posix/Internals.hs
index b940dbc54c..f2207d32a6 100644
--- a/libraries/base/System/Posix/Internals.hs
+++ b/libraries/base/System/Posix/Internals.hs
@@ -379,6 +379,8 @@ foreign import ccall unsafe "HsBase.h __hscore_open"
-- it's expensive (NFS, FUSE, etc.), and we especially
-- need to be able to interrupt a blocking open call.
-- See #17912.
+--
+-- @since 4.16.0.0
c_interruptible_open :: CFilePath -> CInt -> CMode -> IO CInt
c_interruptible_open filepath oflags mode =
getMaskingState >>= \case
@@ -413,13 +415,21 @@ c_interruptible_open filepath oflags mode =
interruptible (IO $ \s -> (# yield# s, () #))
pure open_res
+-- |
+--
+-- @since 4.16.0.0
foreign import ccall interruptible "HsBase.h __hscore_open"
c_interruptible_open_ :: CFilePath -> CInt -> CMode -> IO CInt
-- | Consult the RTS to find whether it is threaded.
+--
+-- @since 4.16.0.0
hostIsThreaded :: Bool
hostIsThreaded = rtsIsThreaded_ /= 0
+-- |
+--
+-- @since 4.16.0.0
foreign import ccall unsafe "rts_isThreaded" rtsIsThreaded_ :: Int
c_safe_open :: CFilePath -> CInt -> CMode -> IO CInt