Use the first available CPU instead of 0 and 1
This makes the test work in docker containers.
Change-Id: I21a93e59434182ba50ef8c9ea45e24dc0e79a617
Signed-off-by: Austin Schuh <austin.schuh@bluerivertech.com>
diff --git a/aos/realtime.h b/aos/realtime.h
index fb49cac..be28e85 100644
--- a/aos/realtime.h
+++ b/aos/realtime.h
@@ -2,6 +2,7 @@
#define AOS_REALTIME_H_
#include <sched.h>
+
#include <string_view>
#include "glog/logging.h"
@@ -37,6 +38,9 @@
return result;
}
+// Returns the current thread's CPU affinity.
+cpu_set_t GetCurrentThreadAffinity();
+
// Sets the current thread's scheduling affinity.
void SetCurrentThreadAffinity(const cpu_set_t &cpuset);