--- /dev/null
+#ifndef __SPINLOCK_H
+#define __SPINLOCK_H
+
+#include <corax/types.h>
+
+/* NOTE: The amd64 implementation in spinlock.S needs this to be an u32_t */
+typedef u32_t spinlock_t;
+
+/*
+ * spinlock_lock() - Lock a spinlock, waiting indefinitely
+ *
+ * SYNOPSIS
+ * void spinlock_lock(spinlock_t *lock);
+ *
+ * DESCRIPTION
+ * The spinlock_lock() function will indefinitely attempt to lock
+ * the spinlock pointed to by `lock' until it succeeds, waiting in
+ * a busy loop.
+ *
+ * RETURN VALUE
+ * None
+ */
+void spinlock_lock(spinlock_t*);
+
+/*
+ * spinlock_trylock() - Attempt to lock a spinlock
+ *
+ * SYNOPSIS
+ * int spinlock_trylock(spinlock_t *lock);
+ *
+ * DESCRIPTION
+ * The spinlock_trylock() function will attempt once to lock the
+ * spinlock pointed to by `lock'. This function will not block.
+ *
+ * RETURN VALUE
+ * 0 the caller now holds the lock
+ * * the spinlock could not be locked
+ */
+int spinlock_trylock(spinlock_t*);
+
+/*
+ * spinlock_unlock() - Unlock a spinlock
+ *
+ * SYNOPSIS
+ * int spinlock_unlock(spinlock_t *lock);
+ *
+ * DESCRIPTION
+ * The spinlock_unlock() function will unlock the spinlock pointed
+ * to by `lock'. This function will unlock any spinlock regardless
+ * of spinlock ownership, and the spinlock will always be unlocked
+ * when this function returns.
+ *
+ * RETURN VALUE
+ * 0 the spinlock was not locked
+ * * the spinlock was locked
+ */
+int spinlock_unlock(spinlock_t*);
+
+#endif /* __SPINLOCK_H */