File tree 4 files changed +45
-0
lines changed
4 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,10 @@ POSIX_FADV_RANDOM
15
15
POSIX_FADV_SEQUENTIAL
16
16
POSIX_FADV_WILLNEED
17
17
POSIX_SPAWN_SETSID
18
+ TFD_CLOEXEC
19
+ TFD_NONBLOCK
20
+ TFD_TIMER_ABSTIME
21
+ TFD_TIMER_CANCEL_ON_SET
18
22
posix_fadvise
19
23
posix_fallocate
20
24
posix_spawn_file_actions_addfchdir_np
@@ -23,3 +27,6 @@ pthread_attr_getstackaddr
23
27
pthread_attr_setstack
24
28
ptsname_r
25
29
syncfs
30
+ timerfd_create
31
+ timerfd_gettime
32
+ timerfd_settime
Original file line number Diff line number Diff line change @@ -1042,6 +1042,10 @@ TCP_KEEPINIT
1042
1042
TCP_KEEPINTVL
1043
1043
TCP_MAXSEG
1044
1044
TCP_MD5SIG
1045
+ TFD_CLOEXEC
1046
+ TFD_NONBLOCK
1047
+ TFD_TIMER_ABSTIME
1048
+ TFD_TIMER_CANCEL_ON_SET
1045
1049
THOUSEP
1046
1050
TIMER_ABSTIME
1047
1051
TIME_DEL
@@ -1613,6 +1617,9 @@ timer_getoverrun
1613
1617
timer_gettime
1614
1618
timer_settime
1615
1619
timer_t
1620
+ timerfd_create
1621
+ timerfd_gettime
1622
+ timerfd_settime
1616
1623
timex
1617
1624
truncate
1618
1625
ttyname_r
Original file line number Diff line number Diff line change @@ -2409,6 +2409,12 @@ pub const RTA_TAG: c_int = 0x100;
2409
2409
pub const RTAX_TAG : c_int = 8 ;
2410
2410
pub const RTAX_MAX : c_int = 9 ;
2411
2411
2412
+ // sys/timerfd.h
2413
+ pub const TFD_CLOEXEC : i32 = crate :: O_CLOEXEC ;
2414
+ pub const TFD_NONBLOCK : i32 = crate :: O_NONBLOCK ;
2415
+ pub const TFD_TIMER_ABSTIME : i32 = crate :: O_WRONLY ;
2416
+ pub const TFD_TIMER_CANCEL_ON_SET : i32 = crate :: O_RDWR ;
2417
+
2412
2418
const_fn ! {
2413
2419
{ const } fn _ALIGN( p: usize ) -> usize {
2414
2420
( p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -2853,6 +2859,16 @@ extern "C" {
2853
2859
#[ link_name = "__getmntinfo13" ]
2854
2860
pub fn getmntinfo ( mntbufp : * mut * mut crate :: statvfs , flags : c_int ) -> c_int ;
2855
2861
pub fn getvfsstat ( buf : * mut statvfs , bufsize : size_t , flags : c_int ) -> c_int ;
2862
+
2863
+ // Added in `NetBSD` 10.0
2864
+ pub fn timerfd_create ( clockid : crate :: clockid_t , flags : c_int ) -> c_int ;
2865
+ pub fn timerfd_gettime ( fd : c_int , curr_value : * mut itimerspec ) -> c_int ;
2866
+ pub fn timerfd_settime (
2867
+ fd : c_int ,
2868
+ flags : c_int ,
2869
+ new_value : * const itimerspec ,
2870
+ old_value : * mut itimerspec ,
2871
+ ) -> c_int ;
2856
2872
}
2857
2873
2858
2874
#[ link( name = "rt" ) ]
Original file line number Diff line number Diff line change @@ -286,6 +286,12 @@ pub const B4000000: crate::speed_t = 31;
286
286
// sys/systeminfo.h
287
287
pub const SI_ADDRESS_WIDTH : c_int = 520 ;
288
288
289
+ // sys/timerfd.h
290
+ pub const TFD_CLOEXEC : i32 = 0o2000000 ;
291
+ pub const TFD_NONBLOCK : i32 = 0o4000 ;
292
+ pub const TFD_TIMER_ABSTIME : i32 = 1 << 0 ;
293
+ pub const TFD_TIMER_CANCEL_ON_SET : i32 = 1 << 1 ;
294
+
289
295
extern "C" {
290
296
pub fn eventfd ( init : c_uint , flags : c_int ) -> c_int ;
291
297
@@ -353,4 +359,13 @@ extern "C" {
353
359
n : size_t ,
354
360
loc : crate :: locale_t ,
355
361
) -> c_int ;
362
+
363
+ pub fn timerfd_create ( clockid : c_int , flags : c_int ) -> c_int ;
364
+ pub fn timerfd_gettime ( fd : c_int , curr_value : * mut crate :: itimerspec ) -> c_int ;
365
+ pub fn timerfd_settime (
366
+ fd : c_int ,
367
+ flags : c_int ,
368
+ new_value : * const crate :: itimerspec ,
369
+ old_value : * mut crate :: itimerspec ,
370
+ ) -> c_int ;
356
371
}
You can’t perform that action at this time.
0 commit comments