summaryrefslogtreecommitdiff
path: root/kernel/source/application.cpp
diff options
context:
space:
mode:
authorBenji Dial <benji@benjidial.net>2024-07-27 16:57:39 -0400
committerBenji Dial <benji@benjidial.net>2024-07-27 16:57:39 -0400
commitfbfc078e9f44c1c1e95c9c484f1d5650bcf631b7 (patch)
treecab539c8cbbac81d895b6f8be695f3f53bf8f4d5 /kernel/source/application.cpp
parent9af5588c30c4126a2800aae1afcb0de2c373dc6c (diff)
downloadhilbert-os-fbfc078e9f44c1c1e95c9c484f1d5650bcf631b7.tar.gz
lots and lots of userspace stuff
Diffstat (limited to 'kernel/source/application.cpp')
-rw-r--r--kernel/source/application.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/kernel/source/application.cpp b/kernel/source/application.cpp
index 0c3fd36..8070019 100644
--- a/kernel/source/application.cpp
+++ b/kernel/source/application.cpp
@@ -239,7 +239,7 @@ namespace hilbert::kernel::application {
void thread::wait_for_socket_stream(socket_stream_end *the_socket_stream) {
waiting_for_socket_stream = the_socket_stream;
the_socket_stream->waiting_to_read.insert(this);
- yield();
+ yield(saved_state);
waiting_for_socket_stream = 0;
}
@@ -247,7 +247,7 @@ namespace hilbert::kernel::application {
socket_listener *the_socket_listener) {
waiting_to_accept_from = the_socket_listener;
the_socket_listener->waiting_to_accept.insert(this);
- yield();
+ yield(saved_state);
waiting_to_accept_from = 0;
return new_socket_stream_id;
}
@@ -256,15 +256,15 @@ namespace hilbert::kernel::application {
socket_listener *the_socket_listener) {
waiting_to_connect_to = the_socket_listener;
the_socket_listener->waiting_to_connect.insert(this);
- yield();
+ yield(saved_state);
waiting_to_connect_to = 0;
return new_socket_stream_id;
}
void thread::wait_for_input() {
- waiting_for_input = false;
+ waiting_for_input = true;
input::waiting_for_input->insert(this);
- yield();
+ yield(saved_state);
waiting_for_input = false;
}