summaryrefslogtreecommitdiffstats
path: root/doc/syscall.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/syscall.md')
-rw-r--r--doc/syscall.md37
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/syscall.md b/doc/syscall.md
index 10f8eb5..6d7583f 100644
--- a/doc/syscall.md
+++ b/doc/syscall.md
@@ -377,6 +377,7 @@ Successful unmapping returns `0`.
| SYSCALL_PCB_RECV | JOVE_PERM_MUTATE | JOVE_PERM_MUTATE |
| SYSCALL_PCB_SWAP | JOVE_PERM_MUTATE | JOVE_PERM_MUTATE |
| SYSCALL_PCB_STACK | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | JOVE_PERM_WRITE, JOVE_PERM_MUTATE |
+| SYSCALL_PCB_STOP | JOVE_PERM_WRITE, JOVE_PERM_MUTATE | |
#### SYSCALL_PCB_YIELD
@@ -490,6 +491,42 @@ If the PCB already has a stack of the specified type, the kernel will return `-E
Successful operation returns `0`.
+#### SYSCALL_PCB_READY
+
+Adds the target PCB to the ready queue, and sets the state to `PCB_STATE_READY`.
+
+If the target PCB is not in the `PCB_STATE_EMBRYO` state, the kernel will return `-EBADCALL`.
+
+If the target PCB does not have a system and interrupt stack, the kernel will return `-ENOTREADY`.
+
+If the target PCB is not in entry `PCB_ROOTDIR_SELF_I`, the kernel will return `-EBADPATH`.
+
+If the root directory of the target PCB does not have a `JOVE_OBJ_PAGEDIR` object at `PCB_ROOTDIR_PAGEDIR_I`, the kernel will return `-EBADPATH`.
+
+Successful calls return `0`.
+
+#### SYSCALL_PCB_STOP
+
+Removes the targeted PCB from the scheduler queue, sets the state to `PCB_STATE_STOPPED`, and sets the state code to the passed value.
+
+| Data | State Code |
+|--------------|-------------|
+| Size (bytes) | sizeof(int) |
+
+If the target PCB is not in the `PCB_STATE_READY` or `PCB_STATE_RUNNING` state, the kernel will return `-EBADCALL`.
+
+If the target PCB is not the current PCB, successful call will return `0`.
+
+Otherwise, the PCB will yield to the next process determined by the scheduler.
+
+
+#### SYSCALL_PCB_STATE
+
+Gets the state code of the target PCB object.
+
+If the target PCB is not in the `PCB_STATE_STOPPED` state, the kernel will return `-ENOTDONE`.
+
+
### JOVE_OBJ_INITRD_FILE
| Syscall | Target Permissions |