21 lines
584 B
C++
21 lines
584 B
C++
#include <hilbert/kernel/application.hpp>
|
|
#include <hilbert/kernel/input.hpp>
|
|
#include <hilbert/kernel/panic.hpp>
|
|
#include <hilbert/kernel/vfile.hpp>
|
|
|
|
namespace hilbert::kernel::input {
|
|
|
|
utility::queue<input_packet> *input_queue;
|
|
utility::queue<application::thread *> *waiting_for_input;
|
|
|
|
void notify_waiting() {
|
|
if (waiting_for_input->count > 0)
|
|
application::paused_threads->insert(waiting_for_input->take());
|
|
}
|
|
|
|
void init_input() {
|
|
input_queue = new utility::queue<input_packet>();
|
|
waiting_for_input = new utility::queue<application::thread *>();
|
|
}
|
|
|
|
}
|