From 6d87016287ea76afbdf7e16fb2cf9e4fa20cc0de Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Sat, 1 Sep 2018 02:27:36 +1000 Subject: Removed the sys_puts system call in favour of calls to tty_write(). Removed the rsputs() function in favour of calls to tty_write(). Corrected a bug in the serial driver and TTY subsystem where a full buffer wouldn't be detected. This was caused by a missing set of brackets on several operations involving the modulus operator. Added the ability for the serial driver to automatically take data from the TTY device's write buffer and push it to the serial port. This can happen in one of two ways; 1) the TTY subsystem notifies the serial driver of new data by calling the write() function pointer in the tty_struct or, 2) the serial port issues an interrupt signalling that it has finished sending data prompting the driver to check the buffers for any more pending data. --- include/kernel/sys.h | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'include/kernel/sys.h') diff --git a/include/kernel/sys.h b/include/kernel/sys.h index e5275cf..1b8be8e 100644 --- a/include/kernel/sys.h +++ b/include/kernel/sys.h @@ -1,6 +1,6 @@ typedef int (*syscall_t) (void); -extern int sys_puts(void); +extern int sys_time(void); extern int sys_time(void); extern int sys_getpid(void); extern int sys_getpdir(void); @@ -11,22 +11,22 @@ extern int sys_ctty(void); extern int sys_read(void); extern int sys_write(void); extern int sys_kill(void); -extern int sys_dummy(void); extern int sys_panic(void); +extern int sys_dummy(void); syscall_t call_table[256] = { - [0] = &sys_puts, - [1] = &sys_time, - [2] = &sys_getpid, - [3] = &sys_getpdir, - [4] = &sys_signal, - [5] = &sys_alarm, - [6] = &sys_pause, - [7] = &sys_ctty, - [8] = &sys_read, - [9] = &sys_write, - [10] = &sys_kill, - [11] = &sys_panic, + [0] = &sys_time, + [1] = &sys_getpid, + [2] = &sys_getpdir, + [3] = &sys_signal, + [4] = &sys_alarm, + [5] = &sys_pause, + [6] = &sys_ctty, + [7] = &sys_read, + [8] = &sys_write, + [9] = &sys_kill, + [10] = &sys_panic, + [11] = &sys_dummy, [12] = &sys_dummy, [13] = &sys_dummy, [14] = &sys_dummy, -- cgit v1.3