Add synchornization primitives, `waiting` to task
diff --git a/include/kernel/sync.h b/include/kernel/sync.h
new file mode 100644
index 0000000..3fbe209
--- /dev/null
+++ b/include/kernel/sync.h
@@ -0,0 +1,23 @@
+#pragma once
+
+#include <kint.h>
+
+// Synchronization primitives
+
+/// Spinlock
+typedef volatile int spinlock_t;
+
+void sl_acquire(spinlock_t *sl);
+void sl_release(spinlock_t *sl);
+spinlock_t sl_new();
+
+/// Semaphore
+typedef volatile int semaphore_t;
+
+void sm_wait(semaphore_t sm);
+void sm_signal(semaphore_t sm);
+semaphore_t sm_new();
+
+/// Initialize synchronization primitives, only call this once after the
+/// scheduler has been initialized.
+void init_sync();