aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-10-22 18:39:57 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-10-22 18:39:57 +0300
commit6be4e656cbf575dbcba95de4e99183586aa88ffe (patch)
treec3fde91dd1d00d199804e7901df79e4de91d9cc7 /include
parent22eeabc6c63e220d628417ea525c8838f3fae913 (diff)
downloadkmi-6be4e656cbf575dbcba95de4e99183586aa88ffe.tar.gz
kmi-6be4e656cbf575dbcba95de4e99183586aa88ffe.zip
create impl and CAP_PROC checking
Diffstat (limited to 'include')
-rw-r--r--include/apos/caps.h3
-rw-r--r--include/apos/tcb.h9
-rw-r--r--include/apos/uapi.h22
3 files changed, 26 insertions, 8 deletions
diff --git a/include/apos/caps.h b/include/apos/caps.h
index b64b05a..e8ef76b 100644
--- a/include/apos/caps.h
+++ b/include/apos/caps.h
@@ -22,9 +22,6 @@ enum {
/** Thread is allowed to force interrupt to callback in other thread. */
CAP_CALL = (1 << 2),
-
- /** Thread is allowed to assign threads to processors. */
- CAP_ASSIGN = (1 << 3),
};
/**
diff --git a/include/apos/tcb.h b/include/apos/tcb.h
index a31e308..b92cd10 100644
--- a/include/apos/tcb.h
+++ b/include/apos/tcb.h
@@ -268,11 +268,18 @@ struct tcb *cur_tcb();
/**
* Get currently executing process.
*
- * @return Current process \ref tcb.
+ * @return Effective process \ref tcb.
*/
struct tcb *cur_proc();
/**
+ * Get currently executing process.
+ *
+ * @return Effective process \ref tcb.
+ */
+struct tcb *eff_proc();
+
+/**
* Set \c t as current \ref tcb.
*
* Also updates the current cpu id of the tcb.
diff --git a/include/apos/uapi.h b/include/apos/uapi.h
index 7d612b6..084c1fa 100644
--- a/include/apos/uapi.h
+++ b/include/apos/uapi.h
@@ -51,12 +51,25 @@ struct sys_ret {
sys_arg_t ar4;
};
+/** Helper for returning sys_ret with 0 arguments. */
#define SYS_RET0() (struct sys_ret){0, 0, 0, 0, 0, 0}
+
+/** Helper for returning sys_ret with 1 arguments. */
#define SYS_RET1(a) (struct sys_ret){a, 0, 0, 0, 0, 0}
+
+/** Helper for returning sys_ret with 2 arguments. */
#define SYS_RET2(a, b) (struct sys_ret){a, b, 0, 0, 0, 0}
+
+/** Helper for returning sys_ret with 3 arguments. */
#define SYS_RET3(a, b, c) (struct sys_ret){a, b, c, 0, 0, 0}
+
+/** Helper for returning sys_ret with 4 arguments. */
#define SYS_RET4(a, b, c, d) (struct sys_ret){a, b, c, d, 0, 0}
+
+/** Helper for returning sys_ret with 5 arguments. */
#define SYS_RET5(a, b, c, d, e) (struct sys_ret){a, b, c, d, e, 0}
+
+/** Helper for returning sys_ret with 6 arguments. */
#define SYS_RET6(a, b, c, d, e, f) (struct sys_ret){a, b, c, d, e, f}
/**
@@ -504,10 +517,11 @@ SYSCALL_DECLARE2(ipc_notify, tid, swap);
* Creates thread in current effective process context.
*
* @param func Function to call on startup.
- * @param arg Argument to pass to function.
- * @param c Unused.
- * @param d Unused.
- * @param e Unused.
+ * @param d0 Argument 0.
+ * @param d1 Argument 1.
+ * @param d2 Argument 2.
+ * @param d3 Argument 3.
+ *
* @return \ref OK and 0.
* \todo Should this take stack size etc?
*/