hw_x86_64: Adjust parameter type of Message_tpl::prepare_send

Change the type of the local name parameter from unsigned to unsigned
long. Otherwise only 4 bytes are copied on x86_64, leaving 4 bytes of
garbage.
This commit is contained in:
Reto Buerki 2015-03-03 17:07:21 +01:00 committed by Christian Helmuth
parent 16a51b317a
commit 147b1ec2b1
1 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ class Genode::Message_tpl
* \param name local name that shall be the first payload word
*/
void prepare_send(void * const data, size_t data_size,
unsigned const name)
unsigned long const name)
{
/* limit data size */
if (data_size > _max_data_size()) {
@ -205,7 +205,7 @@ class Genode::Message_tpl
data_size = _max_data_size();
}
/* copy data */
*(unsigned *)_data = name;
*(unsigned long *)_data = name;
void * const data_dst = (void *)((addr_t)_data + sizeof(name));
void * const data_src = (void *)((addr_t)data + sizeof(name));
memcpy(data_dst, data_src, data_size - sizeof(name));