diff options
author | Bodigrim <andrew.lelechenko@gmail.com> | 2022-11-20 10:04:22 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-20 18:40:44 -0500 |
commit | 451aeac3b07f171f148995717d0d9a1eefe08f0e (patch) | |
tree | 88c108e181cc02f8b101f87644d2624699ae6212 | |
parent | ef511b235f10101f9923e3f098eeeb6a03a734d8 (diff) | |
download | haskell-451aeac3b07f171f148995717d0d9a1eefe08f0e.tar.gz |
Add since pragmas for c_interruptible_open and hostIsThreaded
-rw-r--r-- | libraries/base/System/Posix/Internals.hs | 10 |
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 |