summaryrefslogtreecommitdiff
path: root/kernel/tty.c
diff options
context:
space:
mode:
authorJake Mannens <jake72360@gmail.com>2018-08-07 15:18:20 +1000
committerJake Mannens <jake72360@gmail.com>2018-08-07 15:18:20 +1000
commit55c31434991a9c7cb20f7df06e4039fdd8f7152b (patch)
tree76628d95755dbd2330964b95f067e296a15783d3 /kernel/tty.c
parent3ed830019561a06b0cb98f792cc447a157fd4ef2 (diff)
Fixed a bug where the panic() function called printf() instead of
printk() to notify the user of the kernel panic. This resulted in a system call being made to the kernel itself and the machine not fully halting. Fixed an issue with the serial driver in which the functions rsputs() and rsread() will still attempt a data transfer even if serial_init() failed to detect and initialize a serial port. Added the ability for tasks to be interrupted whilst reading from the serial port. This was done by putting the task into TSTATE_INTERRUPTIBLE instead of TSTATE_UNINTERRUPTIBLE when waiting for data in the serial buffer. Furthermore, a check was introduced after the task wakes up to see if any data was put in the buffer, or if the task was awoken by another source. Changed the type pid_t from an unsigned 16-bit integer to a signed 16-bit integer. This was done to make passing PID's to certain functions easier. Added the new system call sys_kill which will allow one process to send a signal to another. Added the kill_proc() function to sched.c to kill a process. Currently, this works by nullifying the PID field in the process' task structure, marking all the pages mapped to it's address space as free for use, then calling the scheduler to switch to another runnable task (or to idle). Modified the default signal handler within the kernel to now handle the SIGKILL signal by calling kill_proc().
Diffstat (limited to 'kernel/tty.c')
0 files changed, 0 insertions, 0 deletions