L4Re - L4 Runtime Environment
|
Base class for all kinds of kernel objects and remote objects, referenced by capabilities. More...
Public Member Functions | |
l4_msgtag_t | dec_refcnt (l4_mword_t diff, l4_utcb_t *utcb=l4_utcb()) |
Decrement the in kernel reference counter for the object. More... | |
Protected Member Functions | |
l4_cap_idx_t | cap () const throw () |
Return capability selector. More... | |
Base class for all kinds of kernel objects and remote objects, referenced by capabilities.
This is the base class for all remote objects accessible using RPC. However, subclasses doe not directly inherit from L4::Kobject but must use L4::Kobject_t (L4::Kobject_0t, L4::Kobject_2t, L4::Kobject_3t, or L4::Kobject_x) for inheritance, otherwise these classes cannot be used as RPC interfaces.
|
inlineprotected |
Return capability selector.
This method is for derived classes to gain access to the actual capability selector.
Definition at line 79 of file kobject.
References L4_CAP_MASK.
Referenced by L4::Irq::attach(), L4::Icu::bind(), L4::Irq_mux::chain(), L4::Factory::create(), L4::Factory::create_factory(), L4::Factory::create_gate(), L4::Factory::create_irq(), L4::Factory::create_task(), L4::Factory::create_thread(), L4::Factory::create_vm(), L4::Irq::detach(), L4::Semaphore::down(), L4::Thread::ex_regs(), L4::Vcon::get_attr(), L4::Icu::info(), L4::Icu::mask(), L4::Thread::modify_senders(), L4::Vcon::read(), L4::Irq::receive(), L4::Vcon::send(), L4::Vcon::set_attr(), L4::Icu::set_mode(), L4::Triggerable::trigger(), L4::Icu::unbind(), L4::Thread::vcpu_control(), L4::Thread::vcpu_control_ext(), and L4::Vcon::write().
|
inline |
Decrement the in kernel reference counter for the object.
diff | The delta that shall be subtracted from the reference count. |
utcb | UTCB to be used for this operation, usually the UTCB of the calling thread. |
This function is intended for servers to be able to remove the servers own capability from the counted references. This leads to the semantics that the kernel will delete the object even if the capability of the server is valid. The server can detect the deletion by polling its capabilities or by using the IPC-gate deletion IRQs. And to cleanup if the clients dropped the last reference (capability) to the object.