aboutsummaryrefslogtreecommitdiff
path: root/include/apos/uapi.h
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-09-20 15:38:06 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-09-20 15:38:06 +0300
commitd2f2714398d415eb9a628aab82b332b92ad5c923 (patch)
treece6844c3f6f446b3acefffbd294dfecd3eb8dc98 /include/apos/uapi.h
parenta717296a2036cede5fccfff544513043a984d614 (diff)
downloadkmi-d2f2714398d415eb9a628aab82b332b92ad5c923.tar.gz
kmi-d2f2714398d415eb9a628aab82b332b92ad5c923.zip
add capability subsystem and syscalls
Diffstat (limited to 'include/apos/uapi.h')
-rw-r--r--include/apos/uapi.h42
1 files changed, 39 insertions, 3 deletions
diff --git a/include/apos/uapi.h b/include/apos/uapi.h
index 5d61966..d0ce350 100644
--- a/include/apos/uapi.h
+++ b/include/apos/uapi.h
@@ -525,14 +525,14 @@ SYSCALL_DECLARE2(exec, bin, interp);
/**
* Kill syscall.
*
- * @param a Unused.
+ * @param tid Thread ID to kill. 0 if self.
* @param b Unused.
* @param c Unused.
* @param d Unused.
* @param e Unused.
* @return No.
*/
-SYSCALL_DECLARE0(kill);
+SYSCALL_DECLARE1(kill, tid);
/**
* Signal process syscall.
@@ -587,11 +587,47 @@ SYSCALL_DECLARE2(conf_set, param, val);
* @param c Unused.
* @param d Unused.
* @param e Unused.
- * @return \ref OK and 0.
+ * @return \ref OK.
*/
SYSCALL_DECLARE1(conf_get, param);
/**
+ * Set capabilities.
+ *
+ * @param tid Thread ID whose capabilities to set.
+ * @param off Offset of capability, multiple of \c bits(cap).
+ * @param caps Mask of capabilities to set.
+ * @param d Unused.
+ * @param e Unused.
+ * @return \ref OK on success, \ref ERR_INVAL on invalid input.
+ */
+SYSCALL_DECLARE3(set_cap, tid, off, caps);
+
+/**
+ * Get capabilities.
+ *
+ * @param tid Thread ID whose capabilities to get.
+ * @param off Offset of capability, multiple of \c bits(cap).
+ * @param c Unused.
+ * @param d Unused.
+ * @param e Unused.
+ * @return \ref OK, capabilities.
+ */
+SYSCALL_DECLARE2(get_cap, tid, off);
+
+/**
+ * Clear capabilities.
+ *
+ * @param tid Thread ID whose capabilities to clear.
+ * @param off Offset of capability, multiple of \c bits(cap).
+ * @param cap Mask of capabilities to clear.
+ * @param d Unused.
+ * @param e Unused.
+ * @return \ref OK.
+ */
+SYSCALL_DECLARE3(clear_cap, tid, off, cap);
+
+/**
* Power off syscall.
*
* Either shut down or reboot system.