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
This commit is contained in:
Norman Feske 2019-04-05 09:16:28 +02:00 committed by Christian Helmuth
parent 34fd5f626a
commit 51f51c18af
2 changed files with 3 additions and 3 deletions

View File

@ -323,7 +323,7 @@ class Block::Request_stream : Genode::Noncopyable
}
}
void wakeup_client() { _tx.sink()->wakeup(); }
void wakeup_client_if_needed() { _tx.sink()->wakeup(); }
};

View File

@ -39,7 +39,7 @@ struct Test::Block_session_component : Rpc_object<Block::Session>,
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<Typed_root<Block::Session> >
break;
}
block_session.wakeup_client();
block_session.wakeup_client_if_needed();
}