fmn_station_control
interface is implemented by
Fast Messaging Network stations for processors prior to the XLP II.
For all functions, the thread_id parameter denotes the thread id for the core that invokes the call.
The send_message function notifies the station to
initiate a message send on the FMN. The rt_value
parameter carries control bits and the message to send; its content
and bit layout is determined by the system architecture. The return
value indicates whether the FMN station is able to send the message.
The station must check for available resources and immediately return
1
if the message will be queued for delivery, otherwise, if
the station is not ready or if no buffers are available, the station
immediately returns 0
.
The load_message function notifies the station to initiate a message load on the FMN. The bucket indicates the FMN station bucket to read from.
The wait function is used by the core to probe the
station if it should put itself to sleep waiting for a message or
not. Each bit in the vector corresponds to a bucket
to check for messages, i.e. bit 0 corresponds to bucket 0. The
station must return 0
if there are any messages in any of
the buckets requested. The station must return 1
if there
are no messages in any of the buckets. Returning 1
means
that the core can go to sleep until the station wakes the core. The
station must later send a wake signal to the core when a new
message arrive to any of the buckets checked in the last call to
wait. The station wakes the core by raising the signal
on the wakeup port interface for the core.
The sync function enforces a hazard barrier across the send_message function executions, thereby enforcing a strict ordering of the message sequence delivered to the FMN.
SIM_INTERFACE(fmn_station_control) { uint64 (*send_message)(conf_object_t *NOTNULL obj, uint32 thread_id, uint64 rt_value); void (*load_message)(conf_object_t *NOTNULL obj, uint32 thread_id, uint8 bucket); int (*wait)(conf_object_t *NOTNULL obj, uint32 thread_id, uint8 vector); void (*sync)(conf_object_t *NOTNULL obj, uint32 thread_id); }; #define FMN_STATION_CONTROL_INTERFACE "fmn_station_control"