dthain / basekernel

A simple OS kernel for research, teaching, and fun.
GNU General Public License v2.0
806 stars 110 forks source link

Modify keyboard_read_char system call to have an option for non-blocking #165

Closed jmazanec15 closed 6 years ago

jmazanec15 commented 6 years ago

Pull request address issue #162 . I modified the keyboard_read_char to take an argument that indicates whether the call should block or not. Then, I modified all existing programs that use the system call to pass the blocking option so that they still work. Next, I created a snake program that calls keyboard_read_char with the blocking and non-blocking arguments to test the functionality.

jmazanec15 commented 6 years ago

Made changes so that syscalls use read and read_nonblock to read from the keyboard. It works for the snake program.

jmazanec15 commented 6 years ago

I think this is ready to be merged. I ran basekernel.indent on a lot of the files so that it is properly formatted.