aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/kmi/power.h8
-rw-r--r--include/kmi/syscalls.h3
-rw-r--r--include/kmi/uapi.h5
3 files changed, 16 insertions, 0 deletions
diff --git a/include/kmi/power.h b/include/kmi/power.h
index d11b9d1..db00999 100644
--- a/include/kmi/power.h
+++ b/include/kmi/power.h
@@ -35,4 +35,12 @@ enum poweroff_type {
*/
stat_t poweroff(enum poweroff_type type);
+/**
+ * Set the current core to sleep.
+ *
+ * @return Nothing on success (we should be sleeping),
+ * \ref ERR_MISC if sleep was not successful
+ */
+stat_t sleep();
+
#endif
diff --git a/include/kmi/syscalls.h b/include/kmi/syscalls.h
index 1de4fb2..e503709 100644
--- a/include/kmi/syscalls.h
+++ b/include/kmi/syscalls.h
@@ -142,6 +142,9 @@ enum {
/** Shutdown, reboot, etc. */
SYS_POWEROFF,
+ /** Set this core to sleep. */
+ SYS_SLEEP,
+
/** Request to handle IRQ. */
SYS_IRQ_REQ,
diff --git a/include/kmi/uapi.h b/include/kmi/uapi.h
index 40cfae4..d1d3a38 100644
--- a/include/kmi/uapi.h
+++ b/include/kmi/uapi.h
@@ -764,6 +764,11 @@ SYSCALL_DECLARE3(clear_cap, tid, off, cap);
SYSCALL_DECLARE1(poweroff, type);
/**
+ * Sets the current core to sleep. Might take parameters in the future if there
+ * arises a need for different levels of sleep, but for now zero params. */
+SYSCALL_DECLARE0(sleep);
+
+/**
* Request to handle IRQ.
*
* @param t Current tcb.