diff options
| author | Jake Mannens <jake72360@gmail.com> | 2018-08-26 13:29:33 +1000 |
|---|---|---|
| committer | Jake Mannens <jake72360@gmail.com> | 2018-08-26 13:29:33 +1000 |
| commit | 307eaac66d378c1f6150519123ec1204277464d9 (patch) | |
| tree | 8c6dc79c5c16bf776bd57ca78a439701cc10412e /include/unistd.h | |
| parent | dafb5464fe8b9a3f8ff41de233f9ff6cd21162ea (diff) | |
Updated the style of the code in lib/string.c to conform to the rest of
the project.
Added the system call 'sys_panic' as well as the corresponding library
function panic() whose prototype is defined in unistd.h. This is to
allow userspace programs to deliberately crash the kernel for the
purpose of debugging.
Added the element 'write' as a function pointer in the tty_struct
structure. The purpose of this function pointer is to provide a means
for the TTY subsystem to notify the device driver of any newly added
data to the write queue.
Added the tty_write() function to the TTY subsystem. This function will
copy data provided by the user into the specified TTY device's write
queue, blocking if the queue's buffer is full. tty_write() will then
call the driver's write() function to notify it of new data.
Added the rsint_tx() function to the serial driver to handle transmit
interrupts by re-supplying the UART's transmit FIFO.
Diffstat (limited to 'include/unistd.h')
| -rw-r--r-- | include/unistd.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/unistd.h b/include/unistd.h index c337e57..a7e4f32 100644 --- a/include/unistd.h +++ b/include/unistd.h @@ -19,7 +19,9 @@ typedef int16_t pid_t; #define __SYS_pause 6 #define __SYS_ctty 7 #define __SYS_read 8 -#define __SYS_kill 9 +#define __SYS_write 9 +#define __SYS_kill 10 +#define __SYS_panic 11 #define _syscall0(type, name) \ type name(void) { \ @@ -59,4 +61,6 @@ void *getpdir(void); int pause(void); +void panic(void); + #endif |
