libc: socket_fs_plugin add monitor call

Add monitor call for '_fd_read_ready' because this maps to 'poll' in
'vfs_lxip' which should be executed by the EP.

issue #5104
This commit is contained in:
Sebastian Sumpf 2024-01-05 16:43:19 +01:00 committed by Christian Helmuth
parent 701856b06a
commit 93b3e7d12f

View File

@ -194,10 +194,21 @@ struct Libc::Socket_fs::Context : Plugin_context
bool _fd_read_ready(Fd type)
{
if (_fd[type].file)
return Libc::read_ready_from_kernel(_fd[type].file);
else
return false;
if (!_fd[type].file) return false;
bool ret = false;
auto fn = [&] {
ret = Libc::read_ready_from_kernel(_fd[type].file);
return Fn::COMPLETE;
};
if (Libc::Kernel::kernel().main_context() && Libc::Kernel::kernel().main_suspended()) {
fn();
} else {
monitor().monitor(fn);
}
return ret;
}
bool _fd_write_ready(Fd type)