0 | -- Note: This module is automatically generated when Idris builds
 1 | -- the library and the constants will be replaced with values
 2 | -- matching the system this is generated on.
 3 | --
 4 | -- The placeholders are here so that it works with tools like the LSP
 5 | -- without first compiling the library. They were generated on an x86_64
 6 | -- GNU/Linux system with GCC. If you are on a similar system, your numbers
 7 | -- might very well be identical.
 8 | module System.Linux.Epoll.Flags
 9 |
10 | import Data.Bits
11 | import Derive.Prelude
12 | import public System.Posix.Poll.Types
13 |
14 | %default total
15 | %language ElabReflection
16 |
17 | public export
18 | record EpollFlags where
19 |   constructor F
20 |   flags : Bits32
21 |
22 | namespace EpollFlags
23 |   %runElab derive "EpollFlags" [Show,Eq,Ord,FromInteger]
24 |
25 | public export
26 | Semigroup EpollFlags where
27 |   F x <+> F y = F $ x .|. y
28 |
29 | public export
30 | Monoid EpollFlags where neutral = F 0
31 |
32 | public export
33 | data EpollOp = Add | Del | Mod
34 |
35 | %runElab derive "EpollOp" [Show,Eq,Ord]
36 |
37 |
38 | public export
39 | opCode : EpollOp -> Bits32
40 | opCode Add = 1
41 | opCode Del = 2
42 | opCode Mod = 3
43 |
44 | public export
45 | EPOLLRDHUP : PollEvent
46 | EPOLLRDHUP = 8192
47 |
48 | public export
49 | EPOLLET : PollEvent
50 | EPOLLET = 2147483648
51 |
52 | public export
53 | EPOLLONESHOT : PollEvent
54 | EPOLLONESHOT = 1073741824
55 |
56 | public export
57 | EPOLLWAKEUP : PollEvent
58 | EPOLLWAKEUP = 536870912
59 |
60 | public export
61 | EPOLLEXCLUSIVE : PollEvent
62 | EPOLLEXCLUSIVE = 268435456
63 |
64 | public export
65 | EPOLL_CLOEXEC : EpollFlags
66 | EPOLL_CLOEXEC = 524288
67 |
68 | public export %inline
69 | epoll_event_size : Bits32
70 | epoll_event_size = 12
71 |