L4Re Operating System Framework
Interface and Usage Documentation
|
Base class for all kinds of kernel objects and remote objects, referenced by capabilities. More...
#include <kobject>
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. | |
Protected Member Functions | |
l4_cap_idx_t | cap () const noexcept |
Return capability selector. | |
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 do 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.
|
inlineprotectednoexcept |
Return capability selector.
This method is for derived classes to gain access to the actual capability selector.
Definition at line 79 of file kobject.
Referenced by L4::Debugger::add_image_info(), L4::Task::add_ku_mem(), L4::Task::cap_equal(), L4::Task::cap_valid(), L4::Thread::control(), L4::Factory::create(), L4::Factory::create(), L4::Factory::create_factory(), L4::Factory::create_gate(), L4::Factory::create_task(), L4::Task::delete_obj(), L4::Thread::ex_regs(), L4::Thread::ex_regs(), L4::Debugger::get_object_name(), L4::Debugger::global_id(), L4::Debugger::kobj_to_id(), L4::Task::map(), L4::Thread::modify_senders(), L4::Debugger::query_log_name(), L4::Debugger::query_log_typeid(), L4::Thread::register_del_irq(), L4::Task::release_cap(), L4::Debugger::set_object_name(), L4::Thread::stats_time(), L4::Debugger::switch_log(), L4::Thread::switch_to(), L4::Task::unmap(), L4::Task::unmap_batch(), L4::Thread::vcpu_control(), L4::Thread::vcpu_control_ext(), L4::Thread::vcpu_resume_commit(), and L4::Vm::vgicc_map().
|
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, shall be the UTCB of the calling thread. See l4_utcb. |
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.
This function only succeeds on a kernel object of type L4::Ipc_gate which has the server right (L4_FPAGE_C_IPCGATE_SVR). For other kernel objects, -L4_ENOSYS is returned.