L4Re - L4 Runtime Environment
L4::Kobject Class Reference

Base class for all kinds of kernel objects and remote objects, referenced by capabilities. More...

+ Inheritance diagram for L4::Kobject:
+ Collaboration diagram for L4::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. More...
 

Protected Member Functions

l4_cap_idx_t cap () const throw ()
 Return capability selector. More...
 

Detailed Description

Base class for all kinds of kernel objects and remote objects, referenced by capabilities.

Include File
#include <l4/sys/capability>

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.

Attention
Objects derived from Kobject must never add any data to those objects. Kobjects can act only as proxy object for encapsulating object invocations.

Definition at line 46 of file kobject.

Member Function Documentation

◆ cap()

l4_cap_idx_t L4::Kobject::cap ( ) const
throw (
)
inlineprotected

Return capability selector.

Returns
Capability selector.

This method is for derived classes to gain access to the actual capability selector.

Definition at line 79 of file kobject.

◆ dec_refcnt()

l4_msgtag_t L4::Kobject::dec_refcnt ( l4_mword_t  diff,
l4_utcb_t utcb = l4_utcb() 
)
inline

Decrement the in kernel reference counter for the object.

Parameters
diffThe delta that shall be subtracted from the reference count.
utcbUTCB 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.

Definition at line 104 of file kobject.


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