#include <shm_queue.h>
Collaboration diagram for shm_queue_header< T >:
Public Member Functions | |
shm_queue_header (size_t s=0) | |
void * | operator new (size_t s, shm_allocator &a) |
void | operator delete (void *p, shm_allocator &a) |
Public Attributes | |
size_t | size |
shm_ptr< shm_queue_node< T > > | head |
shm_ptr< shm_queue_node< T > > | tail |
pthread_mutex_t | lock |
pthread_mutex_t | head_lock |
pthread_mutex_t | tail_lock |
pthread_cond_t | ready_for_push |
pthread_cond_t | ready_for_pop |
The queue header also contains the member variables for the required mutex and condition variables.
Definition at line 54 of file shm_queue.h.
shm_queue_header< T >::shm_queue_header | ( | size_t | s = 0 |
) | [inline] |
construct a queue header with an initial size.
The queue is constructed with a head and tail with shared memory pointers containing initial offset of zero (indicating NULL). The queue tail is intially locked.
s | size of the queue |
Definition at line 66 of file shm_queue.h.
References shm_queue_header< T >::head, shm_queue_header< T >::head_lock, shm_queue_header< T >::ready_for_pop, shm_queue_header< T >::ready_for_push, shm_ptr< T >::set(), and shm_queue_header< T >::tail.
Here is the call graph for this function:
void* shm_queue_header< T >::operator new | ( | size_t | s, | |
shm_allocator & | a | |||
) | [inline] |
Definition at line 105 of file shm_queue.h.
References shm_allocator::alloc().
Here is the call graph for this function:
void shm_queue_header< T >::operator delete | ( | void * | p, | |
shm_allocator & | a | |||
) | [inline] |
Definition at line 109 of file shm_queue.h.
References shm_allocator::free().
Here is the call graph for this function:
size_t shm_queue_header< T >::size |
Definition at line 114 of file shm_queue.h.
Referenced by shm_queue< T >::pop(), shm_queue< T >::push(), and shm_queue< T >::size().
shm_ptr<shm_queue_node<T> > shm_queue_header< T >::head |
Definition at line 115 of file shm_queue.h.
Referenced by shm_queue< T >::pop(), shm_queue< T >::push(), and shm_queue_header< T >::shm_queue_header().
shm_ptr<shm_queue_node<T> > shm_queue_header< T >::tail |
Definition at line 116 of file shm_queue.h.
Referenced by shm_queue< T >::pop(), shm_queue< T >::push(), and shm_queue_header< T >::shm_queue_header().
pthread_mutex_t shm_queue_header< T >::lock |
Definition at line 117 of file shm_queue.h.
pthread_mutex_t shm_queue_header< T >::head_lock |
Definition at line 118 of file shm_queue.h.
Referenced by shm_queue< T >::lock_head(), shm_queue< T >::push(), shm_queue_header< T >::shm_queue_header(), and shm_queue< T >::unlock_head().
pthread_mutex_t shm_queue_header< T >::tail_lock |
Definition at line 119 of file shm_queue.h.
Referenced by shm_queue< T >::lock_tail(), shm_queue< T >::pop(), and shm_queue< T >::unlock_tail().
pthread_cond_t shm_queue_header< T >::ready_for_push |
Definition at line 120 of file shm_queue.h.
Referenced by shm_queue< T >::pop(), and shm_queue_header< T >::shm_queue_header().
pthread_cond_t shm_queue_header< T >::ready_for_pop |
Definition at line 121 of file shm_queue.h.
Referenced by shm_queue< T >::pop(), shm_queue< T >::push(), and shm_queue_header< T >::shm_queue_header().
Project shmq hosted by
|
Documentation generated on Sat Sep 2 10:07:40 2006 for shmq by
![]() |