From 6e8728f2d331b5791004f03659ada81b24653291 Mon Sep 17 00:00:00 2001 From: Sid Hussmann Date: Fri, 19 Feb 2021 16:54:58 +0100 Subject: [PATCH] vfs/pipe: use local signal handling This commit improves the performance of the pipe plugin by using local signal handling and avoiding sending a signal during write when pipe buffer is full. Issue #3583 --- repos/gems/src/lib/vfs/pipe/plugin.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/repos/gems/src/lib/vfs/pipe/plugin.cc b/repos/gems/src/lib/vfs/pipe/plugin.cc index 97533696f9..21a81a15ae 100644 --- a/repos/gems/src/lib/vfs/pipe/plugin.cc +++ b/repos/gems/src/lib/vfs/pipe/plugin.cc @@ -128,12 +128,12 @@ struct Vfs_pipe::Pipe void submit_read_signal() { - Genode::Signal_transmitter(_read_notify_handler).submit(); + _read_notify_handler.local_submit(); } void submit_write_signal() { - Genode::Signal_transmitter(_write_notify_handler).submit(); + _write_notify_handler.local_submit(); } /** @@ -212,7 +212,6 @@ struct Vfs_pipe::Pipe bool notify = buffer.empty(); if (buffer.avail_capacity() == 0) { - submit_read_signal(); out_count = 0; return Write_result::WRITE_OK; }