CAN Device Driver Internals | ||
---|---|---|
<<< Previous | Next >>> |
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; }; |
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.
futher description of error condition
pointer to the FIFO head, oldest slot
pointer to the location, where pointer to newly inserted slot should be added
pointer to list of the free slots associated with queue
pointer to the memory allocated for the list slots.
the lock to ensure atomicity of slot manipulation operations.
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).
<<< Previous | Home | Next >>> |
struct canque_slot_t | Up | canque_fifo_get_inslot |