diff options
| author | Jake Mannens <jake72360@gmail.com> | 2018-07-30 02:09:12 +1000 |
|---|---|---|
| committer | Jake Mannens <jake72360@gmail.com> | 2018-07-30 02:09:12 +1000 |
| commit | 902abebefe10e5e8bc9d80b73e46bcb1635f0be8 (patch) | |
| tree | 303aaed0f6f274e37ee069c120e5e6bec3b5c9c9 /include/unistd.h | |
| parent | 4a91e12af177dc50a2427d335fd522658d821194 (diff) | |
Fixed a bug where the tick_handler() and sigret() functions did not pass
a pointer to the saved state information to check_signals(). This bug
would have only manifested itself if multiple signals were to be
processed (sigret) or if a signal had been set during the handling of a
timer interrupt (tick_handler) and *ONLY* if switching to the user's own
handler since the state information is not needed to invoke the kernel's
default signal handler.
Implemented alarms for userspace processes. This required significant
modification of the scheduler algorithm. When idling waiting for a
process that can run, the scheduler now continually checks the alarms
and signals of each process and updates their state accordingly.
Implemented the sys_alarm system call to set the new 'alarm' field for
the calling process.
Created the sys_pause system call which changes the state of the calling
process to TSTATE_INTERRUPTIBLE, effectively removing it from the
scheduler's run queue, putting it to sleep until a signal arrives.
Diffstat (limited to 'include/unistd.h')
| -rw-r--r-- | include/unistd.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/unistd.h b/include/unistd.h index a784e22..30d41c6 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -11,6 +11,8 @@ typedef uint16_t pid_t; #define __SYS_getpdir 3 #define __SYS_signal 4 #define __SYS_rsputs 5 +#define __SYS_alarm 6 +#define __SYS_pause 7 #define _syscall0(type, name) \ type name(void) { \ @@ -37,4 +39,6 @@ typedef uint16_t pid_t; pid_t getpid(void); void *getpdir(void); +int pause(void); + #endif |
