In this case there's a very nice IPC-based API that can be used. When you call
fork_daemon, you pass in a message (just like for call/respond). The
destination field is ignored; instead, a new thread is created via fork, and
put into the DAEMON state, and the message is sent to that thread. The parent
is put into the CALLING state. So, when the child responds, the parent will
wake up.
This is only really usable if you can figure out your own thread-id, so add a
syscall for that too.
In this case there's a very nice IPC-based API that can be used. When you call fork_daemon, you pass in a message (just like for call/respond). The destination field is ignored; instead, a new thread is created via fork, and put into the DAEMON state, and the message is sent to that thread. The parent is put into the CALLING state. So, when the child responds, the parent will wake up.
This is only really usable if you can figure out your own thread-id, so add a syscall for that too.