foreign-0.2.0.1: A collection of helpers for ffi.
Safe HaskellNone
LanguageHaskell2010

HsForeign.AsyncFFI

Documentation

withAsyncFFI Source #

Arguments

:: Int

Size of callback data

-> (Ptr a -> IO a)

Peek callback data

-> (StablePtr PrimMVar -> Int -> Ptr a -> IO b)

Normal async foreign function: sp -> cap -> ptr -> ()

-> IO a 

withAsyncFFI' Source #

Arguments

:: [MutableByteArray RealWorld]

A list of extra Bytes we will touch, usually it's empty

-> Int

Size of callback data

-> (Ptr a -> IO a)

Peek callback data

-> (StablePtr PrimMVar -> Int -> Ptr a -> IO b)

Normal async foreign function: sp -> cap -> ptr -> ()

-> IO a 

withPrimAsyncFFI :: Prim a => (StablePtr PrimMVar -> Int -> Ptr a -> IO b) -> IO a Source #