Attempt to raise the soft rlimit before going realtime
With the way my machine is set up, this is necessary to run tests.
Change-Id: I53337c626210b2963e5cefe8acbb3892f339bfc0
diff --git a/aos/realtime.cc b/aos/realtime.cc
index 558417f..ff05f32 100644
--- a/aos/realtime.cc
+++ b/aos/realtime.cc
@@ -133,6 +133,10 @@
// Make sure we will only be allowed to run for 3 seconds straight.
SetSoftRLimit(RLIMIT_RTTIME, 3000000, SetLimitForRoot::kYes);
+ // Raise our soft rlimit if necessary.
+ SetSoftRLimit(RLIMIT_RTPRIO, priority, SetLimitForRoot::kNo,
+ AllowSoftLimitDecrease::kNo);
+
struct sched_param param;
param.sched_priority = priority;
PCHECK(sched_setscheduler(0, SCHED_FIFO, ¶m) == 0)