Data Fields | |
unsigned char * | buffer |
unsigned char * | writeptr [MOST_SYNC_OPENS] |
int | writer_count |
unsigned char * | readptr |
unsigned int | full_count |
rtnrt_lock_t | lock |
int | frame_count |
int | bytes_per_frame |
The processes (write syscall) place their contents in this ring buffer. As this happen asynchronously, there's a write pointer for each writer which points to the frame which should be written next (to the beginning of the frame).
To determine the number of full elements in the interrupt service fast, there's a special variable. This is only a performance optimization.
Definition at line 60 of file most-txbuf.h.
unsigned char* tx_buffer::buffer |
the ring buffer
Definition at line 61 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_free(), txbuf_get(), and txbuf_put().
unsigned char* tx_buffer::writeptr[MOST_SYNC_OPENS] |
The write pointers. Points to the first byte of the quadlet which should be written next.
Definition at line 62 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_is_full(), txbuf_put(), and txbuf_update_full_frame_count().
number of writers
Definition at line 66 of file most-txbuf.h.
Referenced by txbuf_alloc(), and txbuf_update_full_frame_count().
unsigned char* tx_buffer::readptr |
the read pointer
Definition at line 67 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_get(), txbuf_is_full(), txbuf_put(), and txbuf_update_full_frame_count().
unsigned int tx_buffer::full_count |
number of bytes which are filled and can be transferred
Definition at line 68 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_get(), and txbuf_update_full_frame_count().
locking for the element count because it's motified by every reader, maybe concurrently
Definition at line 70 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_get(), and txbuf_put().
number of maximum frames in the ring
Definition at line 73 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_get(), txbuf_is_full(), txbuf_put(), and txbuf_update_full_frame_count().
number of quadlets per frame
Definition at line 75 of file most-txbuf.h.
Referenced by txbuf_alloc(), txbuf_get(), txbuf_is_full(), txbuf_put(), and txbuf_update_full_frame_count().