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

Timeout queue to be used in l4re server loop. More...

#include <ipc_timeout_queue>

+ Collaboration diagram for L4::Ipc_svr::Timeout_queue:

Public Types

typedef L4::Ipc_svr::Timeout Timeout
 Provide a local definition of Timeout for backward compatibility.
 

Public Member Functions

l4_kernel_clock_t next_timeout () const
 Get the time for the next timeout.
 
bool timeout_expired (l4_kernel_clock_t now) const
 Determine if a timeout has happened.
 
void handle_expired_timeouts (l4_kernel_clock_t now)
 run the callbacks of expired timeouts
 
void add (Timeout *timeout, l4_kernel_clock_t time)
 Add a timeout to the queue.
 
void remove (Timeout *timeout)
 Remove timeout from the queue.
 

Detailed Description

Timeout queue to be used in l4re server loop.

Definition at line 65 of file ipc_timeout_queue.

Member Function Documentation

◆ add()

void L4::Ipc_svr::Timeout_queue::add ( Timeout timeout,
l4_kernel_clock_t  time 
)
inline

Add a timeout to the queue.

Parameters
timeouttimeout object to add
timethe time when the timeout expires
Precondition
timeout must not be in any queue already

Definition at line 121 of file ipc_timeout_queue.

References cxx::Bits::Basic_list< POLICY >::begin(), cxx::Bits::Basic_list< POLICY >::end(), and cxx::H_list< T, POLICY >::insert_before().

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::add_timeout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handle_expired_timeouts()

void L4::Ipc_svr::Timeout_queue::handle_expired_timeouts ( l4_kernel_clock_t  now)
inline

run the callbacks of expired timeouts

Parameters
nowthe current time.

Definition at line 101 of file ipc_timeout_queue.

References cxx::Bits::Basic_list< POLICY >::begin(), cxx::Bits::Basic_list< POLICY >::empty(), cxx::H_list< T, POLICY >::erase(), and L4::Ipc_svr::Timeout::expired().

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::setup_wait().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ next_timeout()

l4_kernel_clock_t L4::Ipc_svr::Timeout_queue::next_timeout ( ) const
inline

Get the time for the next timeout.

Returns
the time for the next timeout or 0 if there is none

Definition at line 75 of file ipc_timeout_queue.

References cxx::Bits::Basic_list< POLICY >::front().

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::timeout(), and timeout_expired().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ remove()

void L4::Ipc_svr::Timeout_queue::remove ( Timeout timeout)
inline

Remove timeout from the queue.

Parameters
timeouttimeout to remove from timeout queue
Precondition
timeout must be in this queue

Definition at line 136 of file ipc_timeout_queue.

References cxx::H_list< T, POLICY >::remove().

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::remove_timeout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ timeout_expired()

bool L4::Ipc_svr::Timeout_queue::timeout_expired ( l4_kernel_clock_t  now) const
inline

Determine if a timeout has happened.

Parameters
nowThe current time.
Return values
trueThere is at least one expired timeout in the queue. false No expired timeout in the queue.

Definition at line 91 of file ipc_timeout_queue.

References next_timeout().

Referenced by L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::before_reply(), and L4::Ipc_svr::Timeout_queue_hooks< HOOKS, BR_MAN >::setup_wait().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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