aboutsummaryrefslogtreecommitdiff
path: root/src/kernel/include/worker.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/kernel/include/worker.h')
-rw-r--r--src/kernel/include/worker.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/kernel/include/worker.h b/src/kernel/include/worker.h
new file mode 100644
index 0000000..ec76dc4
--- /dev/null
+++ b/src/kernel/include/worker.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include <thread.h>
+#include <mutex.h>
+
+void start_workers(int num_worker_threads); // default : one is enough
+
+bool worker_push(entry_t fun, void* data);
+bool worker_push_in(int usecs, entry_t fun, void* data);
+
+void worker_notify_time(int usecs); // time source : PIT IRQ0
+
+uint64_t worker_get_time(); // usecs since we started some worker threads, ie since kernel startup
+
+/* vim: set ts=4 sw=4 tw=0 noet :*/