2 * D header file for GNU/Linux.
4 * License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
5 * Authors: Nemanja Boric
7 module core
.sys
.linux
.sys
.eventfd
;
14 version (ARM
) version = ARM_Any
;
15 version (AArch64
) version = ARM_Any
;
16 version (HPPA
) version = HPPA_Any
;
17 version (MIPS32
) version = MIPS_Any
;
18 version (MIPS64
) version = MIPS_Any
;
19 version (PPC
) version = PPC_Any
;
20 version (PPC64
) version = PPC_Any
;
21 version (RISCV32
) version = RISCV_Any
;
22 version (RISCV64
) version = RISCV_Any
;
23 version (S390
) version = IBMZ_Any
;
24 version (SPARC
) version = SPARC_Any
;
25 version (SPARC64
) version = SPARC_Any
;
26 version (SystemZ
) version = IBMZ_Any
;
27 version (X86
) version = X86_Any
;
28 version (X86_64
) version = X86_Any
;
30 import core
.stdc
.stdint
: uint64_t
;
32 /// Type for the event counter
33 alias uint64_t eventfd_t
;
35 /* Return file descriptor for generic event channel. Set initial
37 int eventfd (uint count
, int flags
);
39 /* Read event counter and possibly wait for events. */
40 int eventfd_read (int fd
, eventfd_t
* value
);
42 /* Increment event counter. */
43 int eventfd_write (int fd
, eventfd_t value
);
45 version (CRuntime_UClibc
)
49 enum EFD_SEMAPHORE
= 1;
50 enum EFD_CLOEXEC
= 0x80000; // octal!02000000
51 enum EFD_NONBLOCK
= 0x80; // octal!00000200
53 else version (SPARC_Any
)
55 enum EFD_SEMAPHORE
= 1;
56 enum EFD_CLOEXEC
= 0x400000;
57 enum EFD_NONBLOCK
= 0x004000;
61 enum EFD_SEMAPHORE
= 1;
62 enum EFD_CLOEXEC
= 0x80000; // octal!02000000
63 enum EFD_NONBLOCK
= 0x800; // octal!00004000
66 else version (X86_Any
)
68 enum EFD_SEMAPHORE
= 1;
69 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
70 enum EFD_NONBLOCK
= 0x800; // octal!4000
72 else version (HPPA_Any
)
74 enum EFD_SEMAPHORE
= 1;
75 enum EFD_CLOEXEC
= 0x200000; // octal!10000000
76 enum EFD_NONBLOCK
= 0x10004; // octal!00200004
78 else version (MIPS_Any
)
80 enum EFD_SEMAPHORE
= 1;
81 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
82 enum EFD_NONBLOCK
= 0x80; // octal!200
84 else version (PPC_Any
)
86 enum EFD_SEMAPHORE
= 1;
87 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
88 enum EFD_NONBLOCK
= 0x800; // octal!4000
90 else version (ARM_Any
)
92 enum EFD_SEMAPHORE
= 1;
93 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
94 enum EFD_NONBLOCK
= 0x800; // octal!4000
96 else version (RISCV_Any
)
98 enum EFD_SEMAPHORE
= 1;
99 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
100 enum EFD_NONBLOCK
= 0x800; // octal!4000
102 else version (SPARC_Any
)
104 enum EFD_SEMAPHORE
= 1;
105 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
106 enum EFD_NONBLOCK
= 0x800; // octal!4000
108 else version (IBMZ_Any
)
110 enum EFD_SEMAPHORE
= 1;
111 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
112 enum EFD_NONBLOCK
= 0x800; // octal!4000
114 else version (LoongArch64
)
116 enum EFD_SEMAPHORE
= 1;
117 enum EFD_CLOEXEC
= 0x80000; // octal!2000000
118 enum EFD_NONBLOCK
= 0x800; // octal!4000
121 static assert(0, "unimplemented");