Skip to content

Commit bc71c7a

Browse files
committed
Fix RLIMIT_RTTIME target_os
1 parent 53c1d3c commit bc71c7a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/sys/resource.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ use libc::{__rlimit_resource_t, rlimit, RLIM_INFINITY};
1313
target_os = "android",
1414
target_os = "dragonfly",
1515
target_os = "bitrig",
16-
target_os = "linux",
1716
))]
1817
use libc::{c_int, rlimit, RLIM_INFINITY};
1918

@@ -49,6 +48,12 @@ libc_enum! {
4948
/// SIGSEGV signal is generated.
5049
RLIMIT_STACK,
5150

51+
/// Linux
52+
/// This is a limit (in microseconds) on the amount of CPU time that a process scheduled
53+
/// under a real-time scheduling policy may consume without making a blocking system call.
54+
#[cfg(any(target_os = "linux"))]
55+
RLIMIT_RTTIME,
56+
5257
// BSDs and Linux
5358
/// This is the maximum number of bytes of memory that may be locked into RAM. This limit
5459
/// is in effect rounded down to the nearest multiple of the system page size.
@@ -79,10 +84,6 @@ libc_enum! {
7984
/// using sched_setscheduler(2) and sched_setparam(2).
8085
#[cfg(any(target_os = "android", target_os = "linux"))]
8186
RLIMIT_RTPRIO,
82-
/// This is a limit (in microseconds) on the amount of CPU time that a process scheduled
83-
/// under a real-time scheduling policy may consume without making a blocking system call.
84-
#[cfg(any(target_os = "android", target_os = "linux"))]
85-
RLIMIT_RTTIME,
8687
/// This is a limit on the number of signals that may be queued for the real user ID of the
8788
/// calling process. Both standard and real-time signals are counted for the purpose of
8889
/// checking this limit.

0 commit comments

Comments
 (0)