Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

Sender Class Reference

A sender. More...

#include <sender.h>

Inheritance diagram for Sender:

Irq Preemption Thread Dirq Virq Kernel_thread List of all members.

Public Member Functions

virtual void ipc_receiver_ready ()=0
 Receiver-ready callback.
Global_id id () const
 Sender ID.
Receiverreceiver () const
 Current receiver.
bool in_sender_list ()
 Sender in a queue of senders?.
void sender_dequeue (Sender **r)
 Dequeue from a sender list.

Protected Member Functions

 Sender (const Global_id &id, int)
 Optimized constructor.
void set_receiver (Receiver *receiver)
 Set current receiver.
void sender_enqueue (Sender **r)
 Enqueue in a sender list.
 Sender (const Global_id &id)
 Constructor.

Protected Attributes

Receiver_receiver

Private Attributes

Global_id _id
Sendersender_next
Sendersender_prev

Friends

class Jdb
class Jdb_thread_list

Detailed Description

A sender.

This is a role class, so real senders need to inherit from it.


Constructor & Destructor Documentation

Sender::Sender const Global_id id,
int 
[inline, explicit, protected]
 

Optimized constructor.

This constructor assumes that the object storage is zero-initialized.

Parameters:
id user-visible thread ID of the sender
ignored an integer argument. The value doesn't matter and is used just to distinguish this constructor from the default one.

Sender::Sender const Global_id id  )  [inline, protected]
 

Constructor.

Parameters:
id user-visible thread ID of the sender


Member Function Documentation

Global_id Sender::id  )  const [inline]
 

Sender ID.

Returns:
user-visible thread ID of the sender

bool Sender::in_sender_list  )  [inline]
 

Sender in a queue of senders?.

Returns:
true if sender has enqueued in a receiver's list of waiting senders

virtual void Sender::ipc_receiver_ready  )  [pure virtual]
 

Receiver-ready callback.

Receivers make sure to call this function on waiting senders when they get ready to receive a message from that sender. Senders need to overwrite this interface.

Implemented in Irq, Preemption, and Thread.

Receiver * Sender::receiver  )  const [inline]
 

Current receiver.

Returns:
receiver this sender is currently trying to send a message to.

void Sender::sender_dequeue Sender **  r  )  [inline]
 

Dequeue from a sender list.

Parameters:
r pointer to sender-list head.

void Sender::sender_enqueue Sender **  r  )  [inline, protected]
 

Enqueue in a sender list.

Parameters:
r pointer to sender-list head.

void Sender::set_receiver Receiver receiver  )  [inline, protected]
 

Set current receiver.

Parameters:
receiver the receiver we're going to send a message to

Reimplemented in Preemption.


Friends And Related Function Documentation

friend class Jdb [friend]
 

Reimplemented in Thread.

friend class Jdb_thread_list [friend]
 

Reimplemented in Thread.


Member Data Documentation

Global_id Sender::_id [private]
 

Receiver* Sender::_receiver [protected]
 

Sender* Sender::sender_next [private]
 

Sender * Sender::sender_prev [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Sep 26 14:20:17 2005 for Fiasco by  doxygen 1.4.2