Pipe. More...
#include <xanlib.h>
Data Fields | |
void *(* | alloc )(size_t size) |
void(* | free )(void *addr) |
XanList * | items |
pthread_mutex_t | itemsMutex |
pthread_cond_t | itemsCond |
void *(* | synchGet )(struct XanPipe *pipe) |
XanListItem *(* | synchPut )(struct XanPipe *pipe, void *item) |
XanListItem *(* | synchPutAtEnd )(struct XanPipe *pipe, void *item) |
XanListItem *(* | synchMoveToEnd )(struct XanPipe *pipe, void *item) |
void(* | synchDeleteItem )(struct XanPipe *pipe, XanListItem *item) |
int(* | synchIsEmpty )(struct XanPipe *pipe) |
void *(* | get )(struct XanPipe *pipe) |
XanListItem *(* | put )(struct XanPipe *pipe, void *item) |
XanListItem *(* | putAtEnd )(struct XanPipe *pipe, void *item) |
XanListItem *(* | moveToEnd )(struct XanPipe *pipe, void *item) |
void(* | deleteItem )(struct XanPipe *pipe, XanListItem *item) |
int(* | isEmpty )(struct XanPipe *pipe) |
void(* | lock )(struct XanPipe *pipe) |
void(* | unlock )(struct XanPipe *pipe) |
void(* | destroyPipe )(struct XanPipe *pipe) |
Pipe.
This is a pipe structure, which can store inside itself unbounded elements.
Definition at line 201 of file xanlib.h.
void*(* XanPipe::alloc)(size_t size) |
Definition at line 204 of file xanlib.h.
Referenced by xanPipeNew().
void(* XanPipe::deleteItem)(struct XanPipe *pipe, XanListItem *item) |
Delete from the pipe the element given as input
Definition at line 222 of file xanlib.h.
Referenced by xanPipeNew().
void(* XanPipe::destroyPipe)(struct XanPipe *pipe) |
Free the memory used by the XanPipe structure. It does not free the memory inside the pipe
Definition at line 226 of file xanlib.h.
Referenced by xanPipeNew().
void(* XanPipe::free)(void *addr) |
Definition at line 205 of file xanlib.h.
Referenced by xanPipeNew().
void*(* XanPipe::get)(struct XanPipe *pipe) |
Fetch the element oldest inside the pipe, if the pipe is empty, then it waits until someone else call the put method.
Definition at line 218 of file xanlib.h.
Referenced by xanPipeNew().
int(* XanPipe::isEmpty)(struct XanPipe *pipe) |
Return 1 if the pipe is empty, 0 otherwise
Definition at line 223 of file xanlib.h.
Referenced by xanPipeNew().
Definition at line 206 of file xanlib.h.
Referenced by _xanPipeDeleteItem(), _xanPipeDestroyPipe(), _xanPipeGet(), _xanPipeIsEmpty(), _xanPipeMoveToEnd(), _xanPipePut(), _xanPipePutAtEnd(), xanPipeGet(), and xanPipeNew().
pthread_cond_t XanPipe::itemsCond |
Definition at line 208 of file xanlib.h.
Referenced by _xanPipeGet(), _xanPipePut(), _xanPipePutAtEnd(), xanPipeGet(), and xanPipeNew().
pthread_mutex_t XanPipe::itemsMutex |
Definition at line 207 of file xanlib.h.
Referenced by _xanPipeGet(), xanPipeDeleteItem(), xanPipeGet(), xanPipeIsEmpty(), xanPipeLock(), xanPipeMoveToEnd(), xanPipeNew(), xanPipePut(), xanPipePutAtEnd(), and xanPipeUnlock().
void(* XanPipe::lock)(struct XanPipe *pipe) |
XanListItem*(* XanPipe::moveToEnd)(struct XanPipe *pipe, void *item) |
Move the element at the end of the pipe.
Definition at line 221 of file xanlib.h.
Referenced by xanPipeNew().
XanListItem*(* XanPipe::put)(struct XanPipe *pipe, void *item) |
Insert a new element inside the pipe, if the pipe was empty, then it wake up the eventually threads which they are waiting inside the get method.
Definition at line 219 of file xanlib.h.
Referenced by xanPipeNew().
XanListItem*(* XanPipe::putAtEnd)(struct XanPipe *pipe, void *item) |
Insert a new element at the end of the pipe, if the pipe was empty, then it wake up the eventually threads which they are waiting inside the get method.
Definition at line 220 of file xanlib.h.
Referenced by xanPipeNew().
void(* XanPipe::synchDeleteItem)(struct XanPipe *pipe, XanListItem *item) |
Delete from the pipe the element given as input. This operation is act only after taked the lock of the pipe.
Definition at line 215 of file xanlib.h.
Referenced by xanPipeNew().
void*(* XanPipe::synchGet)(struct XanPipe *pipe) |
Fetch the element oldest inside the pipe, if the pipe is empty, then it waits until someone else call the put method. This method is synchronized for the thread safe guarantees.
Definition at line 211 of file xanlib.h.
Referenced by xanPipeNew().
int(* XanPipe::synchIsEmpty)(struct XanPipe *pipe) |
Return 1 if the pipe is empty, 0 otherwise. This operation is act only after taked the lock of the pipe.
Definition at line 216 of file xanlib.h.
Referenced by xanPipeNew().
XanListItem*(* XanPipe::synchMoveToEnd)(struct XanPipe *pipe, void *item) |
Move the element at the end of the pipe. This method is synchronized for the thread safe guarantees.
Definition at line 214 of file xanlib.h.
Referenced by xanPipeNew().
XanListItem*(* XanPipe::synchPut)(struct XanPipe *pipe, void *item) |
Insert a new element inside the pipe, if the pipe was empty, then it wake up the eventually threads which they are waiting inside the get method. This method is synchronized for the thread safe guarantees.
Definition at line 212 of file xanlib.h.
Referenced by xanPipeNew().
XanListItem*(* XanPipe::synchPutAtEnd)(struct XanPipe *pipe, void *item) |
Insert a new element at the end of the pipe, if the pipe was empty, then it wake up the eventually threads which they are waiting inside the get method. This method is synchronized for the thread safe guarantees.
Definition at line 213 of file xanlib.h.
Referenced by xanPipeNew().
void(* XanPipe::unlock)(struct XanPipe *pipe) |