Hi,

i was reading some code when i came over this function. This is my version:

static inline _L4_word_t
_L4_attribute_always_inline
_L4_msg_get_string_item (_L4_msg_t msg, _L4_word_t nr, void *string_item)
{
  __L4_msg_tag_t tag = { .raw = _L4_msg_msg_tag (msg) };
  /* We do not break any strict aliasing rules here, as we only use
     the pointers for pointer arithmetic.  */
  _L4_word_t pos = 1 + tag.untyped + nr;
  int count;

  count = _L4_string_item_words (_string_item, 0);
  __builtin_memcpy (string_item, &msg[pos], sizeof (_L4_word_t) * count);

  return count;
}

I just dont understand the one on the cvs but i think it wouldnt work.
What do you think about it?

cheers,
Daniel

_______________________________________________
L4-hurd mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/l4-hurd

Reply via email to