struct canque_ends_t

Name

struct canque_ends_t --  CAN message delivery subsystem graph vertex (FIFO ends)

Synopsis

struct canque_ends_t {
  struct list_head * active;
  struct list_head idle;
  struct list_head inlist;
  spinlock_t ends_lock;
  void (* notify (struct canque_ends_t *qends, struct canque_edge_t *qedge, int what);
  void * context;
  union endinfo;
};  

Members

active

the array of the lists of active edges directed to the ends structure with ready messages. The array is indexed by the edges priorities.

idle

the list of the edges directed to the ends structure with empty FIFOs.

inlist

the list of outgoing edges input sides.

ends_lock

the lock synchronizing operations between threads accessing same ends structure.

notify

pointer to notify procedure. The next state changes are notified. CANQUEUE_NOTIFY_EMPTY (out->in call) - all slots are processed by FIFO out side. CANQUEUE_NOTIFY_SPACE (out->in call) - full state negated => there is space for new message. CANQUEUE_NOTIFY_PROC (in->out call) - empty state negated => out side is requested to process slots. CANQUEUE_NOTIFY_NOUSR (both) - notify, that the last user has released the edge usage called with some lock to prevent edge disappear. CANQUEUE_NOTIFY_DEAD (both) - edge is in progress of deletion. CANQUEUE_NOTIFY_ATACH (both) - new edge has been attached to end. CANQUEUE_NOTIFY_FILTCH (out->in call) - edge filter rules changed CANQUEUE_NOTIFY_ERROR (out->in call) - error in messages processing.

context

space to store ends user specific information

endinfo

space to store some other ends usage specific informations mainly for waking-up by the notify calls.

Description

Structure represents place to connect edges to for CAN communication entity. The zero, one or more incoming and outgoing edges can be connected to this structure.