tx_buffer Struct Reference


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

Detailed Description

Transfer buffer for MOST, implemented as ringbuffer. The buffer is one large buffer. It contains the complete MOST frames without the unused quadlets, i.e. exactly as they are needed in the interrupt service routine to place them in the change buffer.

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.


Field Documentation

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().

int tx_buffer::writer_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().

rtnrt_lock_t tx_buffer::lock

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().

int tx_buffer::frame_count

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().

int tx_buffer::bytes_per_frame

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().


The documentation for this struct was generated from the following file:
Generated on Fri Mar 9 14:48:58 2007 for MOST Linux Drivers (Linux and RTAI) by  doxygen 1.5.0