sandwichdoge / catchOS

A small multitasking operating system for Intel i386 architecture.
MIT License
5 stars 1 forks source link

I/O event system #12

Open sandwichdoge opened 4 years ago

sandwichdoge commented 4 years ago

Need to design an I/O event system, so that when a task waits for an I/O event (disk read, keyboard, etc.), it gets put in the wait queue until I/O procedure is finished and the task will be signaled to continue.

sandwichdoge commented 4 years ago

Typical usage:

while (!event) {
  task_yield()
}

event here could be keyboard presses.