Functions | |
int | rb_set_nonblocking () |
int | rb_create (int size, int max_event_size, int *handle) |
int | rb_delete (int handle) |
int | rb_get_wp (int handle, void **p, int millisec) |
int | rb_increment_wp (int handle, int size) |
int | rb_get_rp (int handle, void **p, int millisec) |
int | rb_increment_rp (int handle, int size) |
int | rb_get_buffer_level (int handle, int *n_bytes) |
|
Create a ring buffer with a given size Provide an inter-thread buffer scheme for handling front-end events. This code allows concurrent data acquisition, calibration and network transfer on a multi-CPU machine. One thread reads out the data, passes it via the ring buffer functions to another thread running on the other CPU, which can then calibrate and/or send the data over the network.
Definition at line 17124 of file midas.c. Referenced by register_equipment(). |
|
Delete a ring buffer
|
|
Return number of bytes in a ring buffer
|
|
Obtain the current read pointer at which new data is available with optional timeout
Definition at line 17352 of file midas.c. Referenced by receive_trigger_event(). |
|
Retrieve write pointer where new data can be written
Definition at line 17214 of file midas.c. Referenced by interrupt_routine(), and readout_thread(). |
|
Increment current read pointer, freeing up space for the writing thread.
Definition at line 17414 of file midas.c. Referenced by receive_trigger_event(). |
|
rb_increment_wp Increment current write pointer, making the data at the write pointer available to the receiving thread
Definition at line 17290 of file midas.c. Referenced by interrupt_routine(), and readout_thread(). |
|
Set all rb_get_xx to nonblocking. Needed in multi-thread environments for stopping all theads without deadlock
Definition at line 17083 of file midas.c. Referenced by main(). |