Add RT scheduler tracking
This interacts with event loops nicely, both in simulation and in the
real system. This gives us tools to enforce that certain pieces of code
are run in a RT world, and others are not.
Future work will be to enforce that Malloc is not called while realtime.
Change-Id: I3ce3dc287e25390095bac34aed4888434a82f06e
diff --git a/aos/BUILD b/aos/BUILD
index 04c0548..04d77f3 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -274,6 +274,7 @@
],
visibility = ["//visibility:public"],
deps = [
+ ":thread_local",
"@com_github_google_glog//:glog",
],
)
@@ -543,3 +544,15 @@
],
visibility = ["//visibility:public"],
)
+
+cc_test(
+ name = "realtime_test",
+ srcs = [
+ "realtime_test.cc",
+ ],
+ visibility = ["//visibility:public"],
+ deps = [
+ ":realtime",
+ "//aos/testing:googletest",
+ ],
+)