canque_get_inslot4id

Name

canque_get_inslot4id --  finds best outgoing edge and slot for given ID

Synopsis

int canque_get_inslot4id (struct canque_ends_t * qends, struct canque_edge_t ** qedgep, struct canque_slot_t ** slotp, int cmd, unsigned long id, int prio);

Arguments

qends

ends structure belonging to calling communication object

qedgep

place to store pointer to found edge

slotp

place to store pointer to allocated slot

cmd

command type for slot

id

communication ID of message to send into edge

prio

optional priority of message

Description

Function looks for the non-blocked outgoing edge accepting messages with given ID. If edge is found, slot is allocated from that edge. The edges with non-zero mask are preferred over edges open to all messages. If more edges with mask accepts given message ID, the edge with highest priority below or equal to required priority is selected.

Return Value

If there is no usable edge or there is no free slot in edge negative value is returned.