diff options
Diffstat (limited to 'include')
| -rw-r--r-- | include/apos/caps.h | 3 | ||||
| -rw-r--r-- | include/apos/syscalls.h | 5 | ||||
| -rw-r--r-- | include/apos/uapi.h | 14 |
3 files changed, 21 insertions, 1 deletions
diff --git a/include/apos/caps.h b/include/apos/caps.h index e8ef76b..b64b05a 100644 --- a/include/apos/caps.h +++ b/include/apos/caps.h @@ -22,6 +22,9 @@ 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/syscalls.h b/include/apos/syscalls.h index 1746255..5a3f2eb 100644 --- a/include/apos/syscalls.h +++ b/include/apos/syscalls.h @@ -81,7 +81,7 @@ enum { SYS_IPC_RESP, /** IPC notify thread, essentially interrupt or signal. */ - SYS_IPC_NOTIFY + SYS_IPC_NOTIFY, /** @} */ /** @name Process management. */ @@ -101,6 +101,9 @@ enum { /** Switch running process. */ SYS_SWAP, + /** Assign thread to cpu. */ + SYS_ASSIGN, + /** @} */ /** @name Kernel management. */ diff --git a/include/apos/uapi.h b/include/apos/uapi.h index 4fab0ec..8a3deea 100644 --- a/include/apos/uapi.h +++ b/include/apos/uapi.h @@ -559,6 +559,20 @@ SYSCALL_DECLARE1(kill, tid); * @return \ref OK and 0. */ SYSCALL_DECLARE1(swap, tid); + +/** + * Assign syscall. + * + * Assign \p tid to \p cpu, immediately swaps from whetever was running on \p cpu. + * + * @param tid Thread to assign to \p cpu. + * @param cpu Cpu to run \p tid on. + * @param c Unused. + * @param d Unused. + * @param e Unused. + * @return \ref OK and 0. + */ +SYSCALL_DECLARE2(assign, tid, cpu); /** @} */ /** @name Configuration syscalls. */ |
