File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #define _GNU_SOURCE
2+
3+ #ifdef __linux__
4+ #include <sys/eventfd.h>
5+
6+ int f1 () {
7+ return EFD_CLOEXEC ;
8+ }
9+
10+ int f2 () {
11+ return EFD_NONBLOCK ;
12+ }
13+
14+ int f3 () {
15+ return EFD_SEMAPHORE ;
16+ }
17+
18+ int f4 (unsigned int initval , int flags ) {
19+ return eventfd (initval , flags );
20+ }
21+ #endif
Original file line number Diff line number Diff line change 1+ #[ cfg( target_os = "linux" ) ]
2+ unsafe fn f1 ( ) -> i32 {
3+ libc:: EFD_CLOEXEC
4+ }
5+
6+ #[ cfg( target_os = "linux" ) ]
7+ unsafe fn f2 ( ) -> i32 {
8+ libc:: EFD_NONBLOCK
9+ }
10+
11+ #[ cfg( target_os = "linux" ) ]
12+ unsafe fn f3 ( ) -> i32 {
13+ libc:: EFD_SEMAPHORE
14+ }
15+
16+ #[ cfg( target_os = "linux" ) ]
17+ unsafe fn f4 ( a0 : u32 , a1 : i32 ) -> i32 {
18+ libc:: eventfd ( a0, a1)
19+ }
Original file line number Diff line number Diff line change @@ -40,6 +40,8 @@ pub mod deque_tgt_unsafe;
4040pub mod dirent_tgt_unsafe;
4141#[ path = r#"../errno/tgt_unsafe.rs"# ]
4242pub mod errno_tgt_unsafe;
43+ #[ path = r#"../eventfd/tgt_unsafe.rs"# ]
44+ pub mod eventfd_tgt_unsafe;
4345#[ path = r#"../fnmatch/tgt_unsafe.rs"# ]
4446pub mod fnmatch_tgt_unsafe;
4547#[ path = r#"../fstream/tgt_refcount.rs"# ]
You can’t perform that action at this time.
0 commit comments