struct canque_fifo_t

Name

struct canque_fifo_t --  CAN FIFO queue representation

Synopsis

struct canque_fifo_t {
  unsigned long fifo_flags;
  unsigned long error_code;
  struct canque_slot_t * head;
  struct canque_slot_t ** tail;
  struct canque_slot_t * flist;
  struct canque_slot_t * entry;
  spinlock_t fifo_lock;
};  

Members

fifo_flags

this field holds global flags describing state of the FIFO. CAN_FIFOF_ERROR is set when some error condition occurs. CAN_FIFOF_ERR2BLOCK defines, that error should lead to the FIFO block state. CAN_FIFOF_BLOCK state blocks insertion of the next messages. CAN_FIFOF_OVERRUN attempt to acquire new slot, when FIFO is full. CAN_FIFOF_FULL indicates FIFO full state. CAN_FIFOF_EMPTY indicates no allocated slot in the FIFO. CAN_FIFOF_DEAD condition indication. Used when FIFO is beeing destroyed.

error_code

futher description of error condition

head

pointer to the FIFO head, oldest slot

tail

pointer to the location, where pointer to newly inserted slot should be added

flist

pointer to list of the free slots associated with queue

entry

pointer to the memory allocated for the list slots.

fifo_lock

the lock to ensure atomicity of slot manipulation operations.

Description

This structure represents CAN FIFO queue. It is implemented as a single linked list of slots prepared for processing. The empty slots are stored in single linked list (flist).