hw: handier names for IPC methods

ref #1108
This commit is contained in:
Martin Stein 2014-03-27 14:07:48 +01:00 committed by Norman Feske
parent f0ec8b27c1
commit b34ce7d2b0
3 changed files with 15 additions and 21 deletions

View File

@ -151,29 +151,27 @@ class Genode::Message_tpl
public:
/**
* Get information about current await-request operation
* Get properties of receive buffer
*
* \return buf_base base of receive buffer
* \return buf_size size of receive buffer
*/
void info_about_await_request(void * & buf_base, size_t & buf_size)
const
void buffer_info(void * & buf_base, size_t & buf_size) const
{
buf_base = (void *)this;
buf_size = MAX_SIZE;
}
/**
* Get information about current send-request operation
* Get properties of request message and receive buffer
*
* \return msg_base base of complete send-message data
* \return msg_size size of complete send-message data
* \return buf_base base of receive buffer
* \return buf_size size of receive buffer
*/
void info_about_send_request(void * & msg_base, size_t & msg_size,
void * & buf_base, size_t & buf_size)
const
void request_info(void * & msg_base, size_t & msg_size,
void * & buf_base, size_t & buf_size) const
{
msg_base = (void *)this;
msg_size = _size();
@ -182,13 +180,12 @@ class Genode::Message_tpl
}
/**
* Get information about current send-reply operation
* Get properties of reply message
*
* \return msg_base base of complete send-message data
* \return msg_size size of complete send-message data
*/
void info_about_send_reply(void * & msg_base, size_t & msg_size)
const
void reply_info(void * & msg_base, size_t & msg_size) const
{
msg_base = (void *)this;
msg_size = _size();

View File

@ -221,11 +221,9 @@ class Kernel::Ipc_node
* \param inbuf_base base of the reply buffer
* \param inbuf_size size of the reply buffer
*/
void send_request_await_reply(Ipc_node * const dst,
void * const req_base,
size_t const req_size,
void * const inbuf_base,
size_t const inbuf_size)
void send_request(Ipc_node * const dst, void * const req_base,
size_t const req_size, void * const inbuf_base,
size_t const inbuf_size)
{
/* assertions */
assert(_state == INACTIVE || _state == PREPARE_REPLY);

View File

@ -403,7 +403,7 @@ void Thread::_call_await_request_msg()
{
void * buf_base;
size_t buf_size;
_utcb_phys->message()->info_about_await_request(buf_base, buf_size);
_utcb_phys->message()->buffer_info(buf_base, buf_size);
if (Ipc_node::await_request(buf_base, buf_size)) {
user_arg_0(0);
return;
@ -424,10 +424,9 @@ void Thread::_call_send_request_msg()
size_t msg_size;
void * buf_base;
size_t buf_size;
_utcb_phys->message()->info_about_send_request(msg_base, msg_size,
buf_base, buf_size);
Ipc_node::send_request_await_reply(dst, msg_base, msg_size,
buf_base, buf_size);
Native_utcb::Message * const msg = _utcb_phys->message();
msg->request_info(msg_base, msg_size, buf_base, buf_size);
Ipc_node::send_request(dst, msg_base, msg_size, buf_base, buf_size);
_unschedule(AWAITS_IPC);
}
@ -436,7 +435,7 @@ void Thread::_call_send_reply_msg()
{
void * msg_base;
size_t msg_size;
_utcb_phys->message()->info_about_send_reply(msg_base, msg_size);
_utcb_phys->message()->reply_info(msg_base, msg_size);
Ipc_node::send_reply(msg_base, msg_size);
bool const await_request_msg = user_arg_1();
if (await_request_msg) { _call_await_request_msg(); }