Question regarding L4_err class usage in method commit_result.

Sergey Grekhov grekhss at
Thu Mar 21 10:55:29 CET 2013

Hello, L4 experts!

I have a question regarding method Kobject_iface::commit_result() in the code of Fiasco.OC. One can easily find in the code something similar to following:

              return commit_result(-L4_err::EPerm);

And this call is very confusing: it looks like returning message tag with error, but in fact the error bit (0x8000) is not set. Moreover, some values from L4_err is intersection with enumeration L4_msg_tag::Protocol because of:
1) sign '-' used when commiting result;
2) place where both values are saved - bits 31...16 of the message tag.
And, finally, there are lots of returns similar to mentioned one (return commit_result(-L4_err::EPerm)) and there are no _any_ code which checks presence of these errors in the tag.

I am very confused about these strange values saved in L4_msg_tag and it appears to me that in these cases should be used method Kobject_iface::commit_error().
Can someone explain the logic behind returning values defined in class L4_err?

Best regards,
Sergey Grekhov

More information about the l4-hackers mailing list