library of assembled shared sources |
http://lass.cocamware.com |
#include <lock_free_stack.h>
Data Structures | |
struct | node_t |
Public Types | |
typedef T | value_type |
Public Member Functions | |
lock_free_stack () | |
~lock_free_stack () | |
void | push (const value_type &x) |
push value on stack. | |
bool | pop (value_type &x) |
Try to pop a value and copy it in x . | |
bool | pop_swap (value_type &x) |
Try to pop a value and swap it in x . | |
Private Types | |
typedef util::TaggedPtr< node_t > | pointer_t |
Private Member Functions | |
lock_free_stack (const lock_free_stack &) | |
lock_free_stack & | operator= (const lock_free_stack &) |
node_t *const | make_node (const value_type &x) |
void | free_node (node_t *node) |
void | push_node (node_t *node) |
node_t *const | pop_node () |
void * | allocate () |
void | deallocate (void *iPointer) |
Private Attributes | |
volatile pointer_t | top_ |
Definition at line 61 of file lock_free_stack.h.
typedef T lass::util::lock_free_stack< T, FixedAllocator >::value_type |
Definition at line 65 of file lock_free_stack.h.
typedef util::TaggedPtr<node_t> lass::util::lock_free_stack< T, FixedAllocator >::pointer_t [private] |
Definition at line 82 of file lock_free_stack.h.
lass::util::lock_free_stack< T, A >::lock_free_stack | ( | ) | [inline] |
Definition at line 51 of file lock_free_stack.inl.
lass::util::lock_free_stack< T, A >::~lock_free_stack | ( | ) | [inline] |
Definition at line 60 of file lock_free_stack.inl.
References lass::util::lock_free_stack< T, FixedAllocator >::free_node(), lass::util::TaggedPtr< T >::get(), lass::util::lock_free_stack< T, FixedAllocator >::node_t::next, lass::stde::next(), and lass::util::lock_free_stack< T, FixedAllocator >::top_.
lass::util::lock_free_stack< T, FixedAllocator >::lock_free_stack | ( | const lock_free_stack< T, FixedAllocator > & | ) | [private] |
void lass::util::lock_free_stack< T, A >::push | ( | const value_type & | x | ) | [inline] |
push value on stack.
Definition at line 78 of file lock_free_stack.inl.
References lass::util::lock_free_stack< T, FixedAllocator >::make_node(), and lass::util::lock_free_stack< T, FixedAllocator >::push_node().
bool lass::util::lock_free_stack< T, A >::pop | ( | value_type & | x | ) | [inline] |
Try to pop a value and copy it in x .
Definition at line 92 of file lock_free_stack.inl.
References lass::util::lock_free_stack< T, FixedAllocator >::free_node(), lass::util::lock_free_stack< T, FixedAllocator >::pop_node(), lass::util::lock_free_stack< T, FixedAllocator >::push_node(), and lass::util::lock_free_stack< T, FixedAllocator >::node_t::value.
bool lass::util::lock_free_stack< T, A >::pop_swap | ( | value_type & | x | ) | [inline] |
Try to pop a value and swap it in x .
Definition at line 121 of file lock_free_stack.inl.
References lass::util::lock_free_stack< T, FixedAllocator >::free_node(), lass::util::lock_free_stack< T, FixedAllocator >::pop_node(), and lass::util::lock_free_stack< T, FixedAllocator >::node_t::value.
lock_free_stack& lass::util::lock_free_stack< T, FixedAllocator >::operator= | ( | const lock_free_stack< T, FixedAllocator > & | ) | [private] |
lock_free_stack< T, A >::node_t *const lass::util::lock_free_stack< T, A >::make_node | ( | const value_type & | x | ) | [inline, private] |
Definition at line 139 of file lock_free_stack.inl.
References lass::util::AllocatorConcurrentFreeList< FixedAllocator >::allocate(), lass::util::AllocatorConcurrentFreeList< FixedAllocator >::deallocate(), lass::util::lock_free_stack< T, FixedAllocator >::node_t::next, and lass::util::lock_free_stack< T, FixedAllocator >::node_t::value.
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::push().
void lass::util::lock_free_stack< T, A >::free_node | ( | node_t * | node | ) | [inline, private] |
Definition at line 158 of file lock_free_stack.inl.
References lass::util::AllocatorConcurrentFreeList< FixedAllocator >::deallocate(), and lass::util::lock_free_stack< T, FixedAllocator >::node_t::value.
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::pop(), lass::util::lock_free_stack< T, FixedAllocator >::pop_swap(), and lass::util::lock_free_stack< T, FixedAllocator >::~lock_free_stack().
void lass::util::lock_free_stack< T, A >::push_node | ( | node_t * | node | ) | [inline, private] |
Definition at line 167 of file lock_free_stack.inl.
References lass::util::TaggedPtr< T >::atomicCompareAndSwap(), lass::util::TaggedPtr< T >::get(), lass::util::lock_free_stack< T, FixedAllocator >::node_t::next, lass::util::TaggedPtr< T >::tag(), and lass::util::lock_free_stack< T, FixedAllocator >::top_.
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::pop(), and lass::util::lock_free_stack< T, FixedAllocator >::push().
lock_free_stack< T, A >::node_t *const lass::util::lock_free_stack< T, A >::pop_node | ( | ) | [inline, private] |
Definition at line 182 of file lock_free_stack.inl.
References lass::util::TaggedPtr< T >::atomicCompareAndSwap(), lass::util::TaggedPtr< T >::get(), lass::stde::next(), lass::util::TaggedPtr< T >::tag(), and lass::util::lock_free_stack< T, FixedAllocator >::top_.
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::pop(), and lass::util::lock_free_stack< T, FixedAllocator >::pop_swap().
void* lass::util::AllocatorConcurrentFreeList< FixedAllocator >::allocate | ( | ) | [inline, inherited] |
Definition at line 877 of file allocator.h.
References lass::util::TaggedPtr< T >::get(), lass::stde::next(), and lass::util::TaggedPtr< T >::tag().
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::make_node().
void lass::util::AllocatorConcurrentFreeList< FixedAllocator >::deallocate | ( | void * | iPointer | ) | [inline, inherited] |
Definition at line 893 of file allocator.h.
References lass::util::TaggedPtr< T >::get(), lass::util::AllocatorConcurrentFreeList< FixedAllocator >::AllocationNode::next, and lass::util::TaggedPtr< T >::tag().
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::free_node(), and lass::util::lock_free_stack< T, FixedAllocator >::make_node().
volatile pointer_t lass::util::lock_free_stack< T, FixedAllocator >::top_ [private] |
Reimplemented from lass::util::AllocatorConcurrentFreeList< FixedAllocator >.
Definition at line 92 of file lock_free_stack.h.
Referenced by lass::util::lock_free_stack< T, FixedAllocator >::pop_node(), lass::util::lock_free_stack< T, FixedAllocator >::push_node(), and lass::util::lock_free_stack< T, FixedAllocator >::~lock_free_stack().
Generated on Mon Nov 10 14:22:16 2008 for Library of Assembled Shared Sources by 1.5.7.1 |