#include <pipeline.h>
Public Types | |
typedef range_step_aux< iterator >::slice | slice_base |
Public Member Functions | |
void | check (void) const |
slice () | |
It is not strictly necessay to initialise the pointers. | |
slice (const slice &slicRef) | |
The default generated copy constructor cannot call 'slice_add'. | |
slice (const slice_base &aSB, piplin_t *pipPtr) | |
~slice () | |
Private Types | |
typedef pipe_circular | piplin_t |
Private Member Functions | |
slice & | operator= (const slice &refSlice) |
Forbidden because of the pointers. | |
Private Attributes | |
piplin_t * | _pipe_ptr |
slice * | _next |
slice * | _prev |
Friends | |
class | pipe_circular |
typedef pipe_circular rpa::pipe_circular< Container, CondVar >::slice::piplin_t [private] |
typedef range_step_aux< iterator >::slice rpa::pipe_circular< Container, CondVar >::slice::slice_base |
rpa::pipe_circular< Container, CondVar >::slice::slice | ( | ) | [inline] |
It is not strictly necessay to initialise the pointers.
rpa::pipe_circular< Container, CondVar >::slice::slice | ( | const slice & | slicRef | ) | [inline] |
The default generated copy constructor cannot call 'slice_add'.
If the code is optimised, this should not be called, which is good, because it is useless to add then del the slice from the list.
rpa::pipe_circular< Container, CondVar >::slice::slice | ( | const slice_base & | aSB, | |
piplin_t * | pipPtr | |||
) | [inline] |
At this moment, the range is still locked, and data is available, because we waited for it in rng_refresh_circular. The pipe pointer is necessary to update the 'Rd' iterator - which is later consistent, and to put this slice in the ordered list of the running slices, i.e. the slices which are being used. It prevents a writer to erase this slice.
Now this slice is ready to be used.
rpa::pipe_circular< Container, CondVar >::slice::~slice | ( | ) | [inline] |
The pipe must be locked when this destructor is called. This is why algorithms must not create/delete slices without protection, and this is why they use chop_again, which does not call the destructors.
void rpa::pipe_circular< Container, CondVar >::slice::check | ( | void | ) | const [inline] |
It is possible to save some CPU cycles by not managing, the prev/next pointers when the slice is not in the list of running slices, but it adds clarity.
slice& rpa::pipe_circular< Container, CondVar >::slice::operator= | ( | const slice & | refSlice | ) | [private] |
Forbidden because of the pointers.
friend class pipe_circular [friend] |
slice* rpa::pipe_circular< Container, CondVar >::slice::_next [private] |
piplin_t* rpa::pipe_circular< Container, CondVar >::slice::_pipe_ptr [private] |
slice * rpa::pipe_circular< Container, CondVar >::slice::_prev [private] |