I'm currently writing an application using LKL that waits for data on a network socket using a blocking call to read() and occasionally write()s data from another application thread. Once the read() syscall has been issued, no write()s can be performed until the socket receives some data and returns from the read().
While in theory I could use select() or poll() here because the data I want to write also comes from another socket, I cannot in practice because the other socket is a non-LKL "normal" socket and we cannot mix LKL and non-LKL FDs (yet?).
I digged into the syscall handling and understand that supporting SMP is probably a bigger issue (I also don't fully understand all the internals of LKL's threading yet), but I would like to see support for it (because I have an actual use case for that) and think it should be tracked in an issue :-)
I'm currently writing an application using LKL that waits for data on a network socket using a blocking call to
read()and occasionallywrite()s data from another application thread. Once theread()syscall has been issued, nowrite()s can be performed until the socket receives some data and returns from theread().While in theory I could use
select()orpoll()here because the data I want to write also comes from another socket, I cannot in practice because the other socket is a non-LKL "normal" socket and we cannot mix LKL and non-LKL FDs (yet?).I digged into the syscall handling and understand that supporting SMP is probably a bigger issue (I also don't fully understand all the internals of LKL's threading yet), but I would like to see support for it (because I have an actual use case for that) and think it should be tracked in an issue :-)