#include <receiver.h>
Inheritance diagram for Receiver:
Public Member Functions | |
bool | sender_ok (const Sender *sender) const |
Return whether the receiver is ready to accept a message from the given sender. | |
void | deny_lipc () |
Dummy function, needed to keep code in Thread generic. | |
void | deny_lipc_snd () |
Dummy function, needed to keep code in Thread generic. | |
Sys_ipc_frame * | rcv_regs () const |
Return a reference to receiver's IPC registers. | |
void | set_pagein_request (Address address, Mword error_code, Thread *notify) |
Send page-in request. | |
bool | in_long_ipc (Sender *sender) const |
Return whether the receiver is still engaged in a long IPC with a sender. | |
Sender ** | sender_list () |
Head of sender list. | |
void | set_timeout (Timeout *t) |
void | reset_timeout () |
int | ipc_try_lock (const Sender *sender) |
Try to start an IPC handshake with this receiver. | |
void | ipc_init (Sender *sender) |
Initiates a receiving IPC and updates the ipc partner. | |
void | ipc_unlock () |
Unlock a receiver locked with ipc_try_lock(). | |
Protected Member Functions | |
void | maybe_enable_lipc () |
Dummy function, needed to keep code in Thread generic. | |
void | allow_lipc () |
Dummy function, needed to keep code in Thread generic. | |
Receiver (Thread_lock *thread_lock, Space *space, unsigned short prio, unsigned short mcp, Unsigned64 quantum) | |
Constructor. | |
Sender * | partner () const |
IPC partner (sender). | |
void | restore_receiver_state (Sender *partner, Sys_ipc_frame *regs) |
Restore a saved IPC state to restart a suspended IPC. | |
void | save_receiver_state (Sender **out_partner, Sys_ipc_frame **out_regs) |
Save IPC state to allow later restart a suspended IPC. | |
void | clear_pagein_request () |
Reset the current page-in request. | |
Address | pagein_addr () const |
Return current page-in address. | |
Mword | pagein_error_code () const |
Return current page-in error code. | |
Thread * | pagein_applicant () |
Return current requestor of a page-in. | |
void | set_rcv_regs (Sys_ipc_frame *regs) |
void | set_partner (Sender *partner) |
Set the IPC partner (sender). | |
void | setup_receiver (Sender *sender, Sys_ipc_frame *regs) |
Convenience function: Set up a receiving IPC and add the corresponding state. | |
unsigned | setup_receiver_state (Sender *sender, Sys_ipc_frame *regs, bool=false) |
Set up a receiving IPC. | |
void | reload_ip_sp_from_utcb () |
Dummy function, needed to keep code in Thread generic. | |
Protected Attributes | |
Timeout * | _timeout |
Private Attributes | |
Sender * | _partner |
Sys_ipc_frame * | _rcv_regs |
Address | _pagein_addr |
Mword | _pagein_error_code |
Thread * | _pagein_applicant |
Sender * | _sender_first |
This is a role class, and real receiver's must inherit from it. The protected interface is intended for the receiver, and the public interface is intended for the sender.
The only reason this class inherits from Context is to force a specific layout for Thread. Otherwise, Receiver could just embed or reference a Context.
|
Constructor.
|
|
Dummy function, needed to keep code in Thread generic.
|
|
Reset the current page-in request.
|
|
Dummy function, needed to keep code in Thread generic.
|
|
Dummy function, needed to keep code in Thread generic.
|
|
Return whether the receiver is still engaged in a long IPC with a sender.
|
|
Initiates a receiving IPC and updates the ipc partner.
|
|
Try to start an IPC handshake with this receiver. Check the receiver's state, checks if the receiver is acceptable at this time, and if OK, /lock/ the receiver and copy the sender's ID to the receiver.
|
|
Unlock a receiver locked with ipc_try_lock().
|
|
Dummy function, needed to keep code in Thread generic.
|
|
Return current page-in address. Returns -1 if there is no page-in request. |
|
Return current requestor of a page-in.
|
|
Return current page-in error code. Returns 0 if there is no page-in request. |
|
IPC partner (sender).
|
|
Return a reference to receiver's IPC registers. Senders call this function to poke values into the receiver's register set.
|
|
Dummy function, needed to keep code in Thread generic.
|
|
|
|
Restore a saved IPC state to restart a suspended IPC.
|
|
Save IPC state to allow later restart a suspended IPC.
|
|
Head of sender list.
|
|
Return whether the receiver is ready to accept a message from the given sender.
|
|
Send page-in request. Senders call this function to request that the receiver pages in memory at a specific address. Afterwards, senders should go to sleep. The receiver will wake them up later.
|
|
Set the IPC partner (sender).
|
|
|
|
|
|
Convenience function: Set up a receiving IPC and add the corresponding state.
|
|
Set up a receiving IPC.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|