L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4::Thread::Modify_senders Class Reference

Class wrapping a list of rules which modify the sender label of IPC messages inbound to this thread. More...

#include <thread>

+ Collaboration diagram for L4::Thread::Modify_senders:

Public Member Functions

int add (l4_umword_t match_mask, l4_umword_t match, l4_umword_t del_bits, l4_umword_t add_bits) noexcept
 Add a rule.
 

Detailed Description

Class wrapping a list of rules which modify the sender label of IPC messages inbound to this thread.

Use the add() function to add modification rules, and use modify_senders() to commit. Do not use the UTCB in between as it is used by add() and modify_senders().

This mechanism shall be used to change the source object labels of every pending IPC of an IPC gate or an IRQ if the labels in such pending IPC become invalid for the receiving thread, potentially because:

  • a thread was unbound from an IPC gate / IRQ, or
  • an IPC gate / IRQ was removed, or
  • the label of an IPC gate / IRQ bound to a thread was changed.

It is not required to perform the modify_sender mechanism after an IPC gate or an IRQ was bound to a thread for the first time.

Definition at line 435 of file thread.

Member Function Documentation

◆ add()

int L4::Thread::Modify_senders::add ( l4_umword_t  match_mask,
l4_umword_t  match,
l4_umword_t  del_bits,
l4_umword_t  add_bits 
)
inlinenoexcept

Add a rule.

Parameters
match_maskBitmask of bits to match the label.
matchBitmask that must be equal to the label after applying match_mask.
del_bitsBits to be deleted from the label.
add_bitsBits to be added to the label.
Returns
0 on success, <0 on error

In pseudo code: if ((sender_label & match_mask) == match) { sender_label = (sender_label & ~del_bits) | add_bits; }

Only the first match is applied.

See also
l4_thread_modify_sender_add()

Definition at line 468 of file thread.

References L4_ENOMEM, and l4_msg_regs_t::mr.

Referenced by L4Re::Util::Object_registry::unregister_obj().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: