fmn_station_control_v2 interface is implemented by Fast
Messaging Network stations for the XLP II processor.
For all functions, the thread_id parameter denotes the thread id for the core that invokes the call.
The send_message function is called when the processor executes
the msgsnd instruction. The rt_value parameter
contains the value of the rt register. The function must return
the value to be written into the rd register.
The load_message function is called when the processor executes
the msgld instruction. The rt_value parameter
contains the value of the rt register. The function must return
the value to be written into the rd register.
The wait function is called when the processor executes the
msgwait instruction. The rt_value parameter contains
the value of the rt register. The function should return 1
if the receive queues are empty, 0 if not. If the receive queues
are empty the station must wake the thread by raising the signal on the
wakeup port of the thread when the next message arrives to one of
the receive queues.
The sync function is called when the processor executes the
msgsync instruction.
SIM_INTERFACE(fmn_station_control_v2) {
uint64 (*send_message)(conf_object_t *NOTNULL obj,
uint32 thread_id,
uint64 rt_value);
uint64 (*load_message)(conf_object_t *NOTNULL obj,
uint32 thread_id,
uint64 rt_value);
int (*wait)(conf_object_t *NOTNULL obj,
uint32 thread_id,
uint64 rt_value);
void (*sync)(conf_object_t *NOTNULL obj,
uint32 thread_id);
};
#define FMN_STATION_CONTROL_V2_INTERFACE "fmn_station_control_v2"