made the usb reading code higher priority
diff --git a/aos/atom_code/init.cc b/aos/atom_code/init.cc
index c4e6d44..b3668e8 100644
--- a/aos/atom_code/init.cc
+++ b/aos/atom_code/init.cc
@@ -81,7 +81,7 @@
void InitNRT() { DoInitNRT(aos_core_create::reference); }
void InitCreate() { DoInitNRT(aos_core_create::create); }
-void Init() {
+void Init(int relative_priority) {
if (getenv(kNoRealtimeEnvironmentVariable) == NULL) { // if nobody set it
LockAllMemory();
// Only let rt processes run for 1 second straight.
@@ -90,7 +90,7 @@
SetSoftRLimit(RLIMIT_RTPRIO, 40, false);
// Set our process to priority 40.
struct sched_param param;
- param.sched_priority = 40;
+ param.sched_priority = 30 + relative_priority;
if (sched_setscheduler(0, SCHED_FIFO, ¶m) != 0) {
Die("%s-init: setting SCHED_FIFO failed with %d (%s)\n",
program_invocation_short_name, errno, strerror(errno));