From 51f51c18afcd698ad866225ca97085ccc75c1940 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Fri, 5 Apr 2019 09:16:28 +0200 Subject: [PATCH] block/request_stream: rename wakeup_client This patch renames 'wakeup_client' to 'wakeup_client_if_needed' to clarify that the method triggers signals only when needed, not on every call. The name 'wakeup_client' is prone to misguide users to call the function conditionally as an optimization, thereby complicating the code, but to no effect. Fixes #3279 --- repos/os/include/block/request_stream.h | 2 +- repos/os/src/test/block_request_stream/main.cc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/repos/os/include/block/request_stream.h b/repos/os/include/block/request_stream.h index 2354e936b..22878d304 100644 --- a/repos/os/include/block/request_stream.h +++ b/repos/os/include/block/request_stream.h @@ -323,7 +323,7 @@ class Block::Request_stream : Genode::Noncopyable } } - void wakeup_client() { _tx.sink()->wakeup(); } + void wakeup_client_if_needed() { _tx.sink()->wakeup(); } }; diff --git a/repos/os/src/test/block_request_stream/main.cc b/repos/os/src/test/block_request_stream/main.cc index c2487bb24..502bd35b3 100644 --- a/repos/os/src/test/block_request_stream/main.cc +++ b/repos/os/src/test/block_request_stream/main.cc @@ -39,7 +39,7 @@ struct Test::Block_session_component : Rpc_object, using Block::Request_stream::with_requests; using Block::Request_stream::with_content; using Block::Request_stream::try_acknowledge; - using Block::Request_stream::wakeup_client; + using Block::Request_stream::wakeup_client_if_needed; Block_session_component(Region_map &rm, Dataspace_capability ds, @@ -201,7 +201,7 @@ struct Test::Main : Rpc_object > break; } - block_session.wakeup_client(); + block_session.wakeup_client_if_needed(); }