mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-29 15:44:02 +00:00
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:
parent
701856b06a
commit
93b3e7d12f
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user