0 | module System.Posix.Poll
 1 |
 2 | import System.Posix.Poll.Prim as P
 3 |
 4 | import public System.Posix.Errno
 5 | import public System.Posix.File
 6 | import public System.Posix.Poll.Struct
 7 | import public System.Posix.Poll.Types
 8 |
 9 | %default total
10 |
11 | ||| Polls the given array of poll file descriptors for file system events.
12 | export %inline
13 | poll :
14 |      {n : _}
15 |   -> {auto has : Has Errno es}
16 |   -> {auto eio : EIO1 f}
17 |   -> CArrayIO n PollFD
18 |   -> (timeout : Int32)
19 |   -> f es (List PollPair)
20 | poll arr timeout = elift1 (P.poll arr timeout)
21 |
22 | ||| Polls the given list of poll file pairs for file system events.
23 | export %inline
24 | pollList :
25 |      {auto has : Has Errno es}
26 |   -> {auto eio : EIO1 f}
27 |   -> List PollPair
28 |   -> (timeout : Int32)
29 |   -> f es (List PollPair)
30 | pollList pairs timeout = elift1 (P.pollList pairs timeout)
31 |