Boost.Interprocess Header Reference
Describes adaptive_pool pooled shared memory STL compatible allocator An STL node allocator that uses a segment manager as memory source. The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc...This node allocator shares a segregated storage between all instances of adaptive_pool with equal sizeof(T) placed in the same segment group. NodesPerBlock is the number of nodes allocated at once when the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks that the adaptive node pool will hold. The rest of the totally free blocks will be deallocated with the segment manager.OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator: (memory usable for nodes / total memory allocated from the segment manager) Obtains adaptive_pool from adaptive_pool adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > implementation_defined::segment_manager segment_manager::void_pointer implementation_defined::pointer implementation_defined::const_pointer T unspecified unspecified segment_manager::size_type segment_manager::difference_type adaptive_pool &const adaptive_pool< T2, SegmentManager2, N2, F2, OP2 > &Not assignable from related adaptive_pool void *Returns a pointer to the node pool. Never throws segment_manager *Returns the segment manager. Never throws size_typeReturns the number of elements that could be allocated. Never throws pointersize_typecvoid_pointer0Allocate memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws voidDeallocates all free blocks of the pool pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory voidsize_typemultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). segment_manager *Not assignable from other adaptive_pool Constructor from a segment manager. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc const adaptive_pool &Copy constructor from other adaptive_pool. Increments the reference count of the associated node pool. Never throws const adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > &Copy constructor from related adaptive_pool. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc Destructor, removes node_pool_t from memory if its reference count reaches to zero. Never throws friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. boolconst adaptive_pool< T, S, NodesPerBlock, F, OP > &const adaptive_pool< T, S, NodesPerBlock, F, OP > &Equality test for same type of adaptive_pool boolconst adaptive_pool< T, S, NodesPerBlock, F, OP > &const adaptive_pool< T, S, NodesPerBlock, F, OP > &Inequality test for same type of adaptive_pool
Describes an allocator that allocates portions of fixed size memory buffer (shared memory, mapped file...) An STL compatible allocator that uses a segment manager as memory source. The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc... Obtains an allocator that allocates objects of type T2 allocator< T2, SegmentManager > SegmentManager SegmentManager::void_pointer T boost::intrusive::pointer_traits< cvoid_ptr >::template rebind_pointer< T >::type boost::intrusive::pointer_traits< pointer >::template rebind_pointer< const T >::type unspecified unspecified segment_manager::size_type segment_manager::difference_type boost::interprocess::version_type< allocator, 2 > segment_manager *Returns the segment manager. Never throws pointersize_typecvoid_ptr0Allocates memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocates memory previously allocated. Never throws size_typeReturns the number of elements that could be allocated. Never throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory voidsize_typemultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws voidconst pointer &P &&Constructs an object Throws if T's constructor throws For backwards compatibility with libraries using C++03 allocators voidconst pointer &Destroys object. Throws if object's destructor throws segment_manager *Constructor from the segment manager. Never throws const allocator &Constructor from other allocator. Never throws const allocator< T2, SegmentManager > &Constructor from related allocator. Never throws friend voidself_t &self_t &Swap segment manager. Does not throw. If each allocator is placed in different memory segments, the result is undefined. boolconst allocator< T, SegmentManager > &const allocator< T, SegmentManager > &Equality test for same type of allocator boolconst allocator< T, SegmentManager > &const allocator< T, SegmentManager > &Inequality test for same type of allocator
Describes cached_adaptive_pool pooled shared memory STL compatible allocator An STL node allocator that uses a segment manager as memory source. The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc...This node allocator shares a segregated storage between all instances of cached_adaptive_pool with equal sizeof(T) placed in the same memory segment. But also caches some nodes privately to avoid some synchronization overhead.NodesPerBlock is the minimum number of nodes of nodes allocated at once when the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks that the adaptive node pool will hold. The rest of the totally free blocks will be deallocated with the segment manager.OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator: (memory usable for nodes / total memory allocated from the segment manager) Obtains cached_adaptive_pool from cached_adaptive_pool cached_adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > implementation_defined::segment_manager segment_manager::void_pointer implementation_defined::pointer implementation_defined::const_pointer T unspecified unspecified segment_manager::size_type segment_manager::difference_type cached_adaptive_pool &const cached_adaptive_pool< T2, SegmentManager2, N2, F2, OP2 > &Not assignable from related cached_adaptive_pool cached_adaptive_pool &const cached_adaptive_pool &Not assignable from other cached_adaptive_pool node_pool_t *Returns a pointer to the node pool. Never throws segment_manager *Returns the segment manager. Never throws size_typeReturns the number of elements that could be allocated. Never throws pointersize_typecvoid_pointer0Allocate memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws voidDeallocates all free blocks of the pool pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws voidconst pointer &const_referenceCopy construct an object. Throws if T's copy constructor throws voidconst pointer &Destroys object. Throws if object's destructor throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory multiallocation_chainsize_typeAllocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidsize_typeSets the new max cached nodes value. This can provoke deallocations if "newmax" is less than current cached nodes. Never throws size_typeReturns the max cached nodes parameter. Never throws segment_manager *Constructor from a segment manager. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc const cached_adaptive_pool &Copy constructor from other cached_adaptive_pool. Increments the reference count of the associated node pool. Never throws const cached_adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > &Copy constructor from related cached_adaptive_pool. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc Destructor, removes node_pool_t from memory if its reference count reaches to zero. Never throws friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. boolconst cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &const cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &Equality test for same type of cached_adaptive_pool boolconst cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &const cached_adaptive_pool< T, S, NodesPerBlock, F, OP > &Inequality test for same type of cached_adaptive_pool
Describes cached_cached_node_allocator pooled shared memory STL compatible allocator Obtains cached_node_allocator from cached_node_allocator cached_node_allocator< T2, SegmentManager > implementation_defined::segment_manager segment_manager::void_pointer implementation_defined::pointer implementation_defined::const_pointer T unspecified unspecified SegmentManager::size_type SegmentManager::difference_type cached_node_allocator &const cached_node_allocator< T2, SegmentManager2, N2 > &Not assignable from related cached_node_allocator cached_node_allocator &const cached_node_allocator &Not assignable from other cached_node_allocator node_pool_t *Returns a pointer to the node pool. Never throws segment_manager *Returns the segment manager. Never throws size_typeReturns the number of elements that could be allocated. Never throws pointersize_typecvoid_pointer0Allocate memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws voidDeallocates all free blocks of the pool pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws voidconst pointer &const_referenceDefault construct an object. Throws if T's default constructor throws voidconst pointer &Destroys object. Throws if object's destructor throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory multiallocation_chainsize_typeAllocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chainAllocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidsize_typeSets the new max cached nodes value. This can provoke deallocations if "newmax" is less than current cached nodes. Never throws size_typeReturns the max cached nodes parameter. Never throws segment_manager *Constructor from a segment manager. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc const cached_node_allocator &Copy constructor from other cached_node_allocator. Increments the reference count of the associated node pool. Never throws const cached_node_allocator< T2, SegmentManager, NodesPerBlock > &Copy constructor from related cached_node_allocator. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc Destructor, removes node_pool_t from memory if its reference count reaches to zero. Never throws friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. boolconst cached_node_allocator< T, S, NPC > &const cached_node_allocator< T, S, NPC > &Equality test for same type of cached_node_allocator boolconst cached_node_allocator< T, S, NPC > &const cached_node_allocator< T, S, NPC > &Inequality test for same type of cached_node_allocator
Describes node_allocator pooled shared memory STL compatible allocator An STL node allocator that uses a segment manager as memory source. The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc... This node allocator shares a segregated storage between all instances of node_allocator with equal sizeof(T) placed in the same segment group. NodesPerBlock is the number of nodes allocated at once when the allocator runs out of nodes Obtains node_allocator from node_allocator node_allocator< T2, SegmentManager, NodesPerBlock > implementation_defined::segment_manager segment_manager::void_pointer implementation_defined::pointer implementation_defined::const_pointer T unspecified unspecified segment_manager::size_type segment_manager::difference_type node_allocator &const node_allocator< T2, SegmentManager2, N2 > &Not assignable from related node_allocator void *Returns a pointer to the node pool. Never throws segment_manager *Returns the segment manager. Never throws size_typeReturns the number of elements that could be allocated. Never throws pointersize_typecvoid_pointer0Allocate memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws voidDeallocates all free blocks of the pool pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws voidconst pointer &const_referenceCopy construct an object. Throws if T's copy constructor throws voidconst pointer &Destroys object. Throws if object's destructor throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory voidsize_typemultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). segment_manager *Not assignable from other node_allocator Constructor from a segment manager. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc const node_allocator &Copy constructor from other node_allocator. Increments the reference count of the associated node pool. Never throws const node_allocator< T2, SegmentManager, NodesPerBlock > &Copy constructor from related node_allocator. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc Destructor, removes node_pool_t from memory if its reference count reaches to zero. Never throws friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. boolconst node_allocator< T, S, NPC > &const node_allocator< T, S, NPC > &Equality test for same type of node_allocator boolconst node_allocator< T, S, NPC > &const node_allocator< T, S, NPC > &Inequality test for same type of node_allocator
Describes private_adaptive_pool_base pooled shared memory STL compatible allocator An STL node allocator that uses a segment manager as memory source. The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc... This allocator has its own node pool.NodesPerBlock is the minimum number of nodes of nodes allocated at once when the allocator needs runs out of nodes. MaxFreeBlocks is the maximum number of totally free blocks that the adaptive node pool will hold. The rest of the totally free blocks will be deallocated with the segment manager.OverheadPercent is the (approximated) maximum size overhead (1-20%) of the allocator: (memory usable for nodes / total memory allocated from the segment manager) Obtains private_adaptive_pool from private_adaptive_pool private_adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > implementation_defined::segment_manager segment_manager::void_pointer implementation_defined::pointer implementation_defined::const_pointer T unspecified unspecified segment_manager::size_type segment_manager::difference_type private_adaptive_pool &const private_adaptive_pool< T2, SegmentManager2, N2, F2 > &Not assignable from related private_adaptive_pool private_adaptive_pool &const private_adaptive_pool &Not assignable from other private_adaptive_pool node_pool_t *Returns a pointer to the node pool. Never throws segment_manager *Returns the segment manager. Never throws size_typeReturns the number of elements that could be allocated. Never throws pointersize_typecvoid_pointer0Allocate memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws voidDeallocates all free blocks of the pool pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws voidconst pointer &const_referenceCopy construct an object. Throws if T's copy constructor throws voidconst pointer &Destroys object. Throws if object's destructor throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory voidsize_typemultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). segment_manager *Constructor from a segment manager. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc const private_adaptive_pool &Copy constructor from other private_adaptive_pool. Increments the reference count of the associated node pool. Never throws const private_adaptive_pool< T2, SegmentManager, NodesPerBlock, MaxFreeBlocks, OverheadPercent > &Copy constructor from related private_adaptive_pool. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc Destructor, removes node_pool_t from memory if its reference count reaches to zero. Never throws friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. boolconst private_adaptive_pool< T, S, NodesPerBlock, F, OP > &const private_adaptive_pool< T, S, NodesPerBlock, F, OP > &Equality test for same type of private_adaptive_pool boolconst private_adaptive_pool< T, S, NodesPerBlock, F, OP > &const private_adaptive_pool< T, S, NodesPerBlock, F, OP > &Inequality test for same type of private_adaptive_pool
Describes private_node_allocator_base pooled shared memory STL compatible allocator An STL node allocator that uses a segment manager as memory source. The internal pointer type will of the same type (raw, smart) as "typename SegmentManager::void_pointer" type. This allows placing the allocator in shared memory, memory mapped-files, etc... This allocator has its own node pool. NodesPerBlock is the number of nodes allocated at once when the allocator needs runs out of nodes Obtains private_node_allocator from private_node_allocator private_node_allocator< T2, SegmentManager, NodesPerBlock > implementation_defined::segment_manager segment_manager::void_pointer implementation_defined::pointer implementation_defined::const_pointer T unspecified unspecified segment_manager::size_type segment_manage::difference_type private_node_allocator &const private_node_allocator< T2, SegmentManager2, N2 > &Not assignable from related private_node_allocator private_node_allocator &const private_node_allocator &Not assignable from other private_node_allocator node_pool_t *Returns a pointer to the node pool. Never throws segment_manager *Returns the segment manager. Never throws size_typeReturns the number of elements that could be allocated. Never throws pointersize_typecvoid_pointer0Allocate memory for an array of count elements. Throws boost::interprocess::bad_alloc if there is no enough memory voidconst pointer &size_typeDeallocate allocated memory. Never throws voidDeallocates all free blocks of the pool pointerreferenceReturns address of mutable object. Never throws const_pointerconst_referenceReturns address of non mutable object. Never throws voidconst pointer &const_referenceCopy construct an object. Throws if T's copy constructor throws voidconst pointer &Destroys object. Throws if object's destructor throws size_typeconst pointer &Returns maximum the number of objects the previously allocated memory pointed by p can hold. This size only works for memory allocated with allocate, allocation_command and allocate_many. pointerboost::interprocess::allocation_typesize_typesize_type &pointer & voidsize_typesize_typemultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) voidconst size_type *size_typemultiallocation_chain &Allocates n_elements elements, each one of size elem_sizes[i]in a contiguous block of memory. The elements must be deallocated voidmultiallocation_chain &Allocates many elements of size elem_size in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. The elements must be deallocated with deallocate(...) pointerAllocates just one object. Memory allocated with this function must be deallocated only with deallocate_one(). Throws boost::interprocess::bad_alloc if there is no enough memory voidsize_typemultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). voidconst pointer &Deallocates memory previously allocated with allocate_one(). You should never use deallocate_one to deallocate memory allocated with other functions different from allocate_one(). Never throws voidmultiallocation_chain &Allocates many elements of size == 1 in a contiguous block of memory. The minimum number to be allocated is min_elements, the preferred and maximum number is preferred_elements. The number of actually allocated elements is will be assigned to received_size. Memory allocated with this function must be deallocated only with deallocate_one(). segment_manager *Constructor from a segment manager. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc const private_node_allocator &Copy constructor from other private_node_allocator. Increments the reference count of the associated node pool. Never throws const private_node_allocator< T2, SegmentManager, NodesPerBlock > &Copy constructor from related private_node_allocator. If not present, constructs a node pool. Increments the reference count of the associated node pool. Can throw boost::interprocess::bad_alloc Destructor, removes node_pool_t from memory if its reference count reaches to zero. Never throws friend voidself_t &self_t &Swaps allocators. Does not throw. If each allocator is placed in a different memory segment, the result is undefined. boolconst private_node_allocator< T, S, NodesPerBlock, F, OP > &const private_node_allocator< T, S, NodesPerBlock, F, OP > &Equality test for same type of private_node_allocator boolconst private_node_allocator< T, S, NodesPerBlock, F, OP > &const private_node_allocator< T, S, NodesPerBlock, F, OP > &Inequality test for same type of private_node_allocator
Describes a function that creates anonymous shared memory that can be shared between forked processes mapped_regionstd::size_tvoid *0A function that creates an anonymous shared memory segment of size "size". If "address" is passed the function will try to map the segment in that address. Otherwise the operating system will choose the mapping address. The function returns a mapped_region holding that segment or throws interprocess_exception if the function fails.
const allocation_type const allocation_type const allocation_type const allocation_type const allocation_type const allocation_type const allocation_type
Tag to indicate that the resource must be only created Tag to indicate that the resource must be only opened for reading Tag to indicate that the resource must be only opened Tag to indicate that the resource must be created. If already created, it must be opened. Tag to indicate that the resource must be only opened for reading Tag to indicate that the resource must be only opened privately for reading const create_only_tValue to indicate that the resource must be only created const open_only_tValue to indicate that the resource must be only opened const open_read_only_tValue to indicate that the resource must be only opened for reading const open_or_create_tValue to indicate that the resource must be created. If already created, it must be opened. const open_copy_on_write_tValue to indicate that the resource must be only opened for reading
Describes the error numbering of interprocess classes = 0 int
Describes exceptions thrown by interprocess classes boost::interprocess::interprocess_exceptionThis exception is thrown when a memory request can't be fulfilled. const char * exceptionThis class is the base class of all exceptions thrown by boost::interprocess const char * native_error_t error_code_t const char * const error_info &const char *0 boost::interprocess::interprocess_exceptionThis is the exception thrown by shared interprocess_mutex family when a deadlock situation is detected or when using a interprocess_condition the interprocess_mutex is not locked const char *
Describes file_mapping and mapped region classes A class that wraps a file-mapping that can be used to create mapped regions from the mapped files voidfile_mapping &Swaps to file_mappings. Does not throw. mode_tReturns access mode used in the constructor mapping_handle_tObtains the mapping handle to be used with mapped_region const char *Returns the name of the file used in the constructor. Constructs an empty file mapping. Does not throw const char *mode_tOpens a file mapping of file "filename", starting in offset "file_offset", and the mapping's size will be "size". The mapping can be opened for read-only "read_only" or read-write "read_write" modes. Throws interprocess_exception on error. file_mapping &&Moves the ownership of "moved"'s file mapping object to *this. After the call, "moved" does not represent any file mapping object. Does not throw file_mapping &file_mapping &&Moves the ownership of "moved"'s file mapping to *this. After the call, "moved" does not represent any file mapping. Does not throw Destroys the file mapping. All mapped regions created from this are still valid. Does not throw boolconst char *Removes the file named "filename" even if it's been memory mapped. Returns true on success. The function might fail in some operating systems if the file is being used other processes and no deletion permission was shared.
Describes index adaptor of boost::map container, to use it as name/shared memory index flat_map_index_aux::index_t< MapConfig >Index type based in flat_map. Just derives from flat_map and defines the interface needed by managed memory segments. voidtypename segment_manager_base::size_typeThis reserves memory to optimize the insertion of n elements in the index. voidThis frees all unnecessary memory. segment_manager_base *Constructor. Takes a pointer to the segment manager. Can throw.
Describes index adaptor of boost::intrusive::set container, to use it as name/shared memory index iset_index_aux::index_t< MapConfig >Index type based in boost::intrusive::set. Just derives from boost::intrusive::set and defines the interface needed by managed memory segments index_type::iterator index_type::const_iterator index_type::insert_commit_data index_type::value_type voidtypename MapConfig::segment_manager_base::size_typeThis reserves memory to optimize the insertion of n elements in the index voidThis frees all unnecessary memory. iteratorconst intrusive_compare_key_type & const_iteratorconst intrusive_compare_key_type & std::pair< iterator, bool >const intrusive_compare_key_type &insert_commit_data & typename MapConfig::segment_manager_base *Constructor. Takes a pointer to the segment manager. Can throw
Describes index adaptor of boost::intrusive::unordered_set container, to use it as name/shared memory index iunordered_set_index_aux::allocator_holder< MapConfig >iunordered_set_index_aux::index_t< MapConfig >Index type based in boost::intrusive::set. Just derives from boost::intrusive::set and defines the interface needed by managed memory segments index_type::iterator index_type::const_iterator index_type::insert_commit_data index_type::value_type index_type::bucket_ptr index_type::bucket_type index_type::bucket_traits index_type::size_type voidsize_typeThis reserves memory to optimize the insertion of n elements in the index voidThis tries to free unused memory previously allocated. iteratorconst intrusive_compare_key_type & const_iteratorconst intrusive_compare_key_type & std::pair< iterator, bool >const intrusive_compare_key_type &insert_commit_data & iteratorvalue_type &insert_commit_data & segment_manager_base *Constructor. Takes a pointer to the segment manager. Can throw
Describes index adaptor of boost::map container, to use it as name/shared memory index boost::container::map< MapConfig >Index type based in boost::interprocess::map. Just derives from boost::interprocess::map and defines the interface needed by managed memory segments voidtypename segment_manager_base::size_typeThis reserves memory to optimize the insertion of n elements in the index voidThis tries to free previously allocate unused memory. segment_manager_base *Constructor. Takes a pointer to the segment manager. Can throw
Describes a null index adaptor, so that if we don't want to construct named objects, we can use this null index type to save resources. Null index type used to save compilation time when named indexes are not needed. int * const int * const_iteratorbegin() is equal to end() iteratorbegin() is equal to end() const_iteratorbegin() is equal to end() iteratorbegin() is equal to end() segment_manager_base *Empty constructor.
Describes index adaptor of boost::unordered_map container, to use it as name/shared memory index unordered_map_index_aux::index_t< MapConfig >Index type based in unordered_map. Just derives from unordered_map and defines the interface needed by managed memory segments voidtypename segment_manager_base::size_typeThis reserves memory to optimize the insertion of n elements in the index voidThis tries to free previously allocate unused memory. segment_manager_base *Constructor. Takes a pointer to the segment manager. Can throw
This header file forward declares the basic interprocess types: boost::interprocess::offset_ptr; boost::interprocess::permissions; boost::interprocess::mapped_region; boost::interprocess::file_mapping; boost::interprocess::shared_memory_object; boost::interprocess::windows_shared_memory; boost::interprocess::xsi_shared_memory; The following synchronization mechanisms and locks: boost::interprocess::null_mutex; boost::interprocess::interprocess_mutex; boost::interprocess::interprocess_recursive_mutex; boost::interprocess::interprocess_semaphore; boost::interprocess::named_mutex; boost::interprocess::named_recursive_mutex; boost::interprocess::named_semaphore; boost::interprocess::interprocess_sharable_mutex; boost::interprocess::interprocess_condition; boost::interprocess::scoped_lock; boost::interprocess::sharable_lock; boost::interprocess::upgradable_lock; The following mutex families: boost::interprocess::mutex_family; boost::interprocess::null_mutex_family; The following allocators: boost::interprocess::allocator; boost::interprocess::node_allocator; boost::interprocess::private_node_allocator; boost::interprocess::cached_node_allocator; boost::interprocess::adaptive_pool; boost::interprocess::private_adaptive_pool; boost::interprocess::cached_adaptive_pool; The following allocation algorithms: boost::interprocess::simple_seq_fit; boost::interprocess::rbtree_best_fit; The following index types: boost::interprocess::flat_map_index; boost::interprocess::iset_index; boost::interprocess::iunordered_set_index; boost::interprocess::map_index; boost::interprocess::null_index; boost::interprocess::unordered_map_index; The following managed memory types: boost::interprocess::segment_manager; boost::interprocess::basic_managed_external_buffer boost::interprocess::managed_external_buffer boost::interprocess::wmanaged_external_buffer boost::interprocess::basic_managed_shared_memory boost::interprocess::managed_shared_memory boost::interprocess::wmanaged_shared_memory boost::interprocess::basic_managed_windows_shared_memory boost::interprocess::managed_windows_shared_memory boost::interprocess::wmanaged_windows_shared_memory boost::interprocess::basic_managed_xsi_shared_memory boost::interprocess::managed_xsi_shared_memory boost::interprocess::wmanaged_xsi_shared_memory boost::interprocess::fixed_managed_shared_memory boost::interprocess::wfixed_managed_shared_memory boost::interprocess::basic_managed_heap_memory boost::interprocess::managed_heap_memory boost::interprocess::wmanaged_heap_memory boost::interprocess::basic_managed_mapped_file boost::interprocess::managed_mapped_file boost::interprocess::wmanaged_mapped_file The following exception types: boost::interprocess::interprocess_exception boost::interprocess::lock_exception boost::interprocess::bad_alloc The following stream types: boost::interprocess::basic_bufferbuf boost::interprocess::basic_ibufferstream boost::interprocess::basic_obufferstream boost::interprocess::basic_bufferstream boost::interprocess::basic_vectorbuf boost::interprocess::basic_ivectorstream boost::interprocess::basic_ovectorstream boost::interprocess::basic_vectorstream The following smart pointer types: boost::interprocess::scoped_ptr boost::interprocess::intrusive_ptr boost::interprocess::shared_ptr boost::interprocess::weak_ptr The following interprocess communication types: boost::interprocess::message_queue_t; boost::interprocess::message_queue;
Describes an inter-process message queue. This class allows sending messages between processes and allows blocking, non-blocking and timed sending and receiving. A class that allows sending messages between processes. VoidPointer boost::intrusive::pointer_traits< void_pointer >::template rebind_pointer< char >::type boost::intrusive::pointer_traits< char_ptr >::difference_type boost::container::dtl::make_unsigned< difference_type >::type voidconst void *size_typeunsigned intSends a message stored in buffer "buffer" with size "buffer_size" in the message queue with priority "priority". If the message queue is full the sender is blocked. Throws interprocess_error on error. boolconst void *size_typeunsigned intSends a message stored in buffer "buffer" with size "buffer_size" through the message queue with priority "priority". If the message queue is full the sender is not blocked and returns false, otherwise returns true. Throws interprocess_error on error. boolconst void *size_typeunsigned intconst boost::posix_time::ptime &Sends a message stored in buffer "buffer" with size "buffer_size" in the message queue with priority "priority". If the message queue is full the sender retries until time "abs_time" is reached. Returns true if the message has been successfully sent. Returns false if timeout is reached. Throws interprocess_error on error. voidvoid *size_typesize_type &unsigned int &Receives a message from the message queue. The message is stored in buffer "buffer", which has size "buffer_size". The received message has size "recvd_size" and priority "priority". If the message queue is empty the receiver is blocked. Throws interprocess_error on error. boolvoid *size_typesize_type &unsigned int &Receives a message from the message queue. The message is stored in buffer "buffer", which has size "buffer_size". The received message has size "recvd_size" and priority "priority". If the message queue is empty the receiver is not blocked and returns false, otherwise returns true. Throws interprocess_error on error. boolvoid *size_typesize_type &unsigned int &const boost::posix_time::ptime &Receives a message from the message queue. The message is stored in buffer "buffer", which has size "buffer_size". The received message has size "recvd_size" and priority "priority". If the message queue is empty the receiver retries until time "abs_time" is reached. Returns true if the message has been successfully sent. Returns false if timeout is reached. Throws interprocess_error on error. size_typeReturns the maximum number of messages allowed by the queue. The message queue must be opened or created previously. Otherwise, returns 0. Never throws size_typeReturns the maximum size of message allowed by the queue. The message queue must be opened or created previously. Otherwise, returns 0. Never throws size_typeReturns the number of messages currently stored. Never throws create_only_tconst char *size_typesize_typeconst permissions &permissions()Creates a process shared message queue with name "name". For this message queue, the maximum number of messages will be "max_num_msg" and the maximum message size will be "max_msg_size". Throws on error and if the queue was previously created. open_or_create_tconst char *size_typesize_typeconst permissions &permissions()Opens or creates a process shared message queue with name "name". If the queue is created, the maximum number of messages will be "max_num_msg" and the maximum message size will be "max_msg_size". If queue was previously created the queue will be opened and "max_num_msg" and "max_msg_size" parameters are ignored. Throws on error. open_only_tconst char *Opens a previously created process shared message queue with name "name". If the queue was not previously created or there are no free resources, throws an error. Destroys *this and indicates that the calling process is finished using the resource. All opened message queues are still valid after destruction. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the message queue from the system use remove(). boolconst char *Removes the message queue from the system. Returns false on error. Never throws Typedef for a default message queue to be used between processes message_queue_t< offset_ptr< void > >
Describes a named user memory allocation user class. A basic user memory named object creation class. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType> base_t::size_type voidsize_type voidbasic_managed_external_buffer &Swaps the ownership of the managed heap memories managed by *this and other. Never throws. Default constructor. Does nothing. Useful in combination with move semantics create_only_tvoid *size_typeCreates and places the segment manager. This can throw. open_only_tvoid *size_typeCreates and places the segment manager. This can throw. basic_managed_external_buffer &&Moves the ownership of "moved"'s managed memory to *this. Does not throw. basic_managed_external_buffer &basic_managed_external_buffer &&Moves the ownership of "moved"'s managed memory to *this. Does not throw. Typedef for a default basic_managed_external_buffer of narrow characters basic_managed_external_buffer< char,rbtree_best_fit< null_mutex_family >,iset_index > Typedef for a default basic_managed_external_buffer of wide characters basic_managed_external_buffer< wchar_t,rbtree_best_fit< null_mutex_family >,iset_index >
Describes a named heap memory allocation user class. A basic heap memory named object creation class. Initializes the heap memory segment. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType> base_t::size_type boolsize_typeTries to resize internal heap memory so that we have room for more objects. WARNING: If memory is reallocated, all the objects will be binary-copied to the new buffer. To be able to use this function, all pointers constructed in this buffer must be offset pointers. Otherwise, the result is undefined. Returns true if the growth has been successful, so you will have some extra bytes to allocate new objects. If returns false, the heap allocation has failed. voidbasic_managed_heap_memory &Swaps the ownership of the managed heap memories managed by *this and other. Never throws. Default constructor. Does nothing. Useful in combination with move semantics Destructor. Liberates the heap memory holding the managed data. Never throws. size_typeCreates heap memory and initializes the segment manager. This can throw. basic_managed_heap_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw. basic_managed_heap_memory &basic_managed_heap_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw. Typedef for a default basic_managed_heap_memory of narrow characters basic_managed_heap_memory< char,rbtree_best_fit< null_mutex_family >,iset_index > Typedef for a default basic_managed_heap_memory of wide characters basic_managed_heap_memory< wchar_t,rbtree_best_fit< null_mutex_family >,iset_index >
A basic mapped file named object creation class. Initializes the mapped file. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType> Unsigned integral type enough to represent the size of a basic_managed_mapped_file. implementation_defined voidbasic_managed_mapped_file &Swaps the ownership of the managed mapped memories managed by *this and other. Never throws. boolFlushes cached data to file. Never throws Creates mapped file and creates and places the segment manager. This can throw. create_only_tconst char *size_typeconst void *0const permissions &permissions()Creates mapped file and creates and places the segment manager. This can throw. open_or_create_tconst char *size_typeconst void *0const permissions &permissions()Creates mapped file and creates and places the segment manager if segment was not created. If segment was created it connects to the segment. This can throw. open_only_tconst char *const void *0Connects to a created mapped file and its segment manager. This can throw. open_copy_on_write_tconst char *const void *0Connects to a created mapped file and its segment manager in copy_on_write mode. This can throw. open_read_only_tconst char *const void *0Connects to a created mapped file and its segment manager in read-only mode. This can throw. basic_managed_mapped_file &&Moves the ownership of "moved"'s managed memory to *this. Does not throw basic_managed_mapped_file &basic_managed_mapped_file &&Moves the ownership of "moved"'s managed memory to *this. Does not throw Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *size_typeTries to resize mapped file so that we have room for more objects.This function is not synchronized so no other thread or process should be reading or writing the file boolconst char *Tries to resize mapped file to minimized the size of the file.This function is not synchronized so no other thread or process should be reading or writing the file Typedef for a default basic_managed_mapped_file of narrow characters basic_managed_mapped_file< char,rbtree_best_fit< mutex_family >,iset_index > Typedef for a default basic_managed_mapped_file of wide characters basic_managed_mapped_file< wchar_t,rbtree_best_fit< mutex_family >,iset_index >
A basic shared memory named object creation class. Initializes the shared memory segment. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType> voidbasic_managed_shared_memory &Swaps the ownership of the managed shared memories managed by *this and other. Never throws. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). Default constructor. Does nothing. Useful in combination with move semantics create_only_tconst char *size_typeconst void *0const permissions &permissions()Creates shared memory and creates and places the segment manager. This can throw. open_or_create_tconst char *size_typeconst void *0const permissions &permissions()Creates shared memory and creates and places the segment manager if segment was not created. If segment was created it connects to the segment. This can throw. open_copy_on_write_tconst char *const void *0Connects to a created shared memory and its segment manager. in copy_on_write mode. This can throw. open_read_only_tconst char *const void *0Connects to a created shared memory and its segment manager. in read-only mode. This can throw. open_only_tconst char *const void *0Connects to a created shared memory and its segment manager. This can throw. basic_managed_shared_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw basic_managed_shared_memory &basic_managed_shared_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw boolconst char *size_typeTries to resize the managed shared memory object so that we have room for more objects.This function is not synchronized so no other thread or process should be reading or writing the file boolconst char *Tries to resize the managed shared memory to minimized the size of the file.This function is not synchronized so no other thread or process should be reading or writing the file Typedef for a default basic_managed_shared_memory of narrow characters basic_managed_shared_memory< char,rbtree_best_fit< mutex_family >,iset_index > Typedef for a default basic_managed_shared_memory of wide characters basic_managed_shared_memory< wchar_t,rbtree_best_fit< mutex_family >,iset_index > Typedef for a default basic_managed_shared_memory of narrow characters to be placed in a fixed address basic_managed_shared_memory< char,rbtree_best_fit< mutex_family, void * >,iset_index > Typedef for a default basic_managed_shared_memory of narrow characters to be placed in a fixed address basic_managed_shared_memory< wchar_t,rbtree_best_fit< mutex_family, void * >,iset_index >
A basic managed windows shared memory creation class. Initializes the shared memory segment. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType> Unlike basic_managed_shared_memory, it has no kernel persistence and the shared memory is destroyed when all processes destroy all their windows_shared_memory objects and mapped regions for the same shared memory or the processes end/crash.Warning: basic_managed_windows_shared_memory and basic_managed_shared_memory can't communicate between them. base_t::size_type voidbasic_managed_windows_shared_memory &Swaps the ownership of the managed mapped memories managed by *this and other. Never throws. Default constructor. Does nothing. Useful in combination with move semantics create_only_tconst char *size_typeconst void *0const permissions &permissions()Creates shared memory and creates and places the segment manager. This can throw. open_or_create_tconst char *size_typeconst void *0const permissions &permissions()Creates shared memory and creates and places the segment manager if segment was not created. If segment was created it connects to the segment. This can throw. open_only_tconst char *const void *0Connects to a created shared memory and its segment manager. This can throw. open_copy_on_write_tconst char *const void *0Connects to a created shared memory and its segment manager in copy_on_write mode. This can throw. open_read_only_tconst char *const void *0Connects to a created shared memory and its segment manager in read-only mode. This can throw. basic_managed_windows_shared_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw basic_managed_windows_shared_memory &basic_managed_windows_shared_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw Destroys *this and indicates that the calling process is finished using the resource. All mapped regions are still valid after destruction. When all mapped regions and basic_managed_windows_shared_memory objects referring the shared memory are destroyed, the operating system will destroy the shared memory. Typedef for a default basic_managed_windows_shared_memory of narrow characters basic_managed_windows_shared_memory< char,rbtree_best_fit< mutex_family >,iset_index > Typedef for a default basic_managed_windows_shared_memory of wide characters basic_managed_windows_shared_memory< wchar_t,rbtree_best_fit< mutex_family >,iset_index >
A basic X/Open System Interface (XSI) shared memory named object creation class. Initializes the shared memory segment. Inherits all basic functionality from basic_managed_memory_impl<CharType, AllocationAlgorithm, IndexType> base_t::size_type voidbasic_managed_xsi_shared_memory &Swaps the ownership of the managed shared memories managed by *this and other. Never throws. int Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). Default constructor. Does nothing. Useful in combination with move semantics create_only_tconst xsi_key &std::size_tconst void *0const permissions &permissions()Creates shared memory and creates and places the segment manager. This can throw. open_or_create_tconst xsi_key &std::size_tconst void *0const permissions &permissions()Creates shared memory and creates and places the segment manager if segment was not created. If segment was created it connects to the segment. This can throw. open_read_only_tconst xsi_key &const void *0Connects to a created shared memory and its segment manager. in read-only mode. This can throw. open_only_tconst xsi_key &const void *0Connects to a created shared memory and its segment manager. This can throw. basic_managed_xsi_shared_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw basic_managed_xsi_shared_memory &basic_managed_xsi_shared_memory &&Moves the ownership of "moved"'s managed memory to *this. Does not throw boolintErases a XSI shared memory object identified by shmid from the system. Returns false on error. Never throws Typedef for a default basic_managed_xsi_shared_memory of narrow characters basic_managed_xsi_shared_memory< char,rbtree_best_fit< mutex_family >,iset_index > Typedef for a default basic_managed_xsi_shared_memory of wide characters basic_managed_xsi_shared_memory< wchar_t,rbtree_best_fit< mutex_family >,iset_index >
Describes mapped region class The mapped_region class represents a portion or region created from a memory_mappable object.The OS can map a region bigger than the requested one, as region must be multiple of the page size, but mapped_region will always refer to the region specified by the user. Specifies that the application has no advice to give on its behavior with respect to the region. It is the default characteristic if no advice is given for a range of memory. Specifies that the application expects to access the region sequentially from lower addresses to higher addresses. The implementation can lower the priority of preceding pages within the region once a page have been accessed. Specifies that the application expects to access the region in a random order, and prefetching is likely not advantageous. Specifies that the application expects to access the region in the near future. The implementation can prefetch pages of the region. Specifies that the application expects that it will not access the region in the near future. The implementation can unload pages within the range to save system resources. This enum specifies region usage behaviors that an application can specify to the mapped region implementation. voidmapped_region &Swaps the mapped_region with another mapped region std::size_tReturns the size of the mapping. Never throws. void *Returns the base address of the mapping. Never throws. mode_tReturns the mode of the mapping used to construct the mapped region. Never throws. boolstd::size_t0std::size_t0booltrueFlushes to the disk a byte range within the mapped memory. If 'async' is true, the function will return before flushing operation is completed If 'async' is false, function will return once data has been written into the underlying device (i.e., in mapped files OS cached information is written to disk). Never throws. Returns false if operation could not be performed. boolstd::size_tbooltrueShrinks current mapped region. If after shrinking there is no longer need for a previously mapped memory page, accessing that page can trigger a segmentation fault. Depending on the OS, this operation might fail (XSI shared memory), it can decommit storage and free a portion of the virtual address space (e.g.POSIX) or this function can release some physical memory wihout freeing any virtual address space(Windows). Returns true on success. Never throws. booladvice_typesAdvises the implementation on the expected behavior of the application with respect to the data in the region. The implementation may use this information to optimize handling of the region data. This function has no effect on the semantics of access to memory in the region, although it may affect the performance of access. If the advise type is not known to the implementation, the function returns false. True otherwise. const MemoryMappable &mode_toffset_t0std::size_t0const void *0map_options_tdefault_map_optionsCreates a mapping region of the mapped memory "mapping", starting in offset "offset", and the mapping's size will be "size". The mapping can be opened for read only, read-write or copy-on-write.If an address is specified, both the offset and the address must be multiples of the page size.The map is created using "default_map_options". This flag is OS dependant and it should not be changed unless the user needs to specify special options.In Windows systems "map_options" is a DWORD value passed as "dwDesiredAccess" to "MapViewOfFileEx". If "default_map_options" is passed it's initialized to zero. "map_options" is XORed with FILE_MAP_[COPY|READ|WRITE].In UNIX systems and POSIX mappings "map_options" is an int value passed as "flags" to "mmap". If "default_map_options" is specified it's initialized to MAP_NOSYNC if that option exists and to zero otherwise. "map_options" XORed with MAP_PRIVATE or MAP_SHARED.In UNIX systems and XSI mappings "map_options" is an int value passed as "shmflg" to "shmat". If "default_map_options" is specified it's initialized to zero. "map_options" is XORed with SHM_RDONLY if needed.The OS could allocate more pages than size/page_size(), but get_address() will always return the address passed in this function (if not null) and get_size() will return the specified size. Default constructor. Address will be 0 (nullptr). Size will be 0. Does not throw mapped_region &&Move constructor. *this will be constructed taking ownership of "other"'s region and "other" will be left in default constructor state. Destroys the mapped region. Does not throw mapped_region &mapped_region &&Move assignment. If *this owns a memory mapped region, it will be destroyed and it will take ownership of "other"'s memory mapped region. std::size_tReturns the size of the page. This size is the minimum memory that will be used by the system when mapping a memory mappable source and will restrict the address and the offset to map.
Describes a best-fit algorithm based in an intrusive red-black tree used to allocate objects in shared memory. This class is intended as a base class for single segment and multi-segment implementations. This class implements an algorithm that stores the free nodes in a red-black tree to have logarithmic search/insert times. Shared mutex family used for the rest of the Interprocess framework. MutexFamily Pointer type to be used with the rest of the Interprocess framework. VoidPointer unspecified boost::intrusive::pointer_traits< char_ptr >::difference_type boost::container::dtl::make_unsigned< difference_type >::type const size_type void *size_typeAllocates bytes, returns 0 if there is not more memory. voidvoid *Deallocates previously allocated bytes. size_typeReturns the size of the memory segment. size_typeReturns the number of free bytes of the segment. voidInitializes to zero all the memory that's not in use. This function is normally used for security reasons. voidsize_typeIncreases managed memory in extra_size bytes more voidDecreases managed memory as much as possible. boolReturns true if all allocated memory has been deallocated. boolMakes an internal sanity check and returns true if success T *boost::interprocess::allocation_typesize_typesize_type &T *& void *boost::interprocess::allocation_typesize_typesize_type &void *&size_type1 size_typeconst void *Returns the size of the buffer previously allocated pointed by ptr. void *size_typesize_typeAllocates aligned bytes, returns 0 if there is not more memory. Alignment must be power of 2 size_typesize_typeConstructor. "size" is the total size of the managed memory segment, "extra_hdr_bytes" indicates the extra bytes beginning in the sizeof(rbtree_best_fit) offset that the allocator should not use at all. Destructor. size_typesize_typeObtains the minimum size needed by the algorithm.
Describes sequential fit algorithm used to allocate objects in shared memory. This class implements the simple sequential fit algorithm with a simply linked list of free buffers. base_t::size_type size_typesize_typeConstructor. "size" is the total size of the managed memory segment, "extra_hdr_bytes" indicates the extra bytes beginning in the sizeof(simple_seq_fit) offset that the allocator should not use at all.
Describes a smart pointer that stores the offset between this pointer and target pointee, called offset_ptr. A smart pointer that stores the offset between between the pointer and the the object it points. This allows offset allows special properties, since the pointer is independent from the address of the pointee, if the pointer and the pointee are still separated by the same offset. This feature converts offset_ptr in a smart pointer that can be placed in shared memory and memory mapped files mapped in different addresses in every process. b>Note: offset_ptr uses implementation defined properties, present in most platforms, for performance reasons: Assumes that OffsetType representation of nullptr is (OffsetType)zero. Assumes that incrementing a OffsetType obtained from a pointer is equivalent to incrementing the pointer and then converting it back to OffsetType. PointedType PointedType * unspecified unspecified DifferenceType std::random_access_iterator_tag OffsetType Compatibility with pointer_traits offset_ptr< U, DifferenceType, OffsetType, OffsetAlignment > pointerObtains raw pointer from offset. Never throws. offset_type pointerPointer-like -> operator. It can return 0 pointer. Never throws. referenceDereferencing operator, if it is a null offset_ptr behavior is undefined. Never throws. referencedifference_typeIndexing operator. Never throws. offset_ptr &difference_typeoffset_ptr += difference_type. Never throws. offset_ptr &difference_typeoffset_ptr -= difference_type. Never throws. offset_ptr &void++offset_ptr. Never throws. offset_ptrintoffset_ptr++. Never throws. offset_ptr &void–offset_ptr. Never throws. offset_ptrintoffset_ptr–. Never throws. boolsafe bool conversion operator. Never throws. boolNot operator. Not needed in theory, but improves portability. Never throws Default constructor (null pointer). Never throws. pointerConstructor from raw pointer (allows "0" pointer conversion). Never throws. T *unspecified0Constructor from other pointer. Never throws. const offset_ptr &Constructor from other offset_ptr Never throws. const offset_ptr< T2, DifferenceType, OffsetType, OffsetAlignment > &Constructor from other offset_ptr. Only takes part in overload resolution if T2* is convertible to PointedType*. Never throws. const offset_ptr< T2, DifferenceType, OffsetType, OffsetAlignment > &Constructor from other offset_ptr. Only takes part in overload resolution if PointedType* is constructible from T2* other than via a conversion (e.g. cast to a derived class). Never throws. const offset_ptr< T2, P2, O2, A2 > &unspecifiedEmulates static_cast operator. Never throws. const offset_ptr< T2, P2, O2, A2 > &unspecifiedEmulates const_cast operator. Never throws. const offset_ptr< T2, P2, O2, A2 > &unspecifiedEmulates dynamic_cast operator. Never throws. const offset_ptr< T2, P2, O2, A2 > &unspecifiedEmulates reinterpret_cast operator. Never throws. offset_ptr &pointerAssignment from pointer (saves extra conversion). Never throws. offset_ptr &const offset_ptr &Assignment from other offset_ptr. Never throws. offset_ptr &const offset_ptr< T2, DifferenceType, OffsetType, OffsetAlignment > &Assignment from related offset_ptr. If pointers of pointee types are assignable, offset_ptrs will be assignable. Never throws. offset_ptrreferenceCompatibility with pointer_traits friend offset_ptrdifference_typeoffset_ptrdifference_type + offset_ptr operation friend offset_ptroffset_ptrdifference_typeoffset_ptr + difference_type operation friend offset_ptroffset_ptrdifference_typeoffset_ptr - diff operation friend offset_ptrdifference_typeoffset_ptroffset_ptr - diff operation friend difference_typeconst offset_ptr &const offset_ptr &offset_ptr - offset_ptr operation voidconst offset_ptr< T2, DifferenceType, OffsetType, OffsetAlignment > &unspecified voidconst offset_ptr< T2, DifferenceType, OffsetType, OffsetAlignment > &unspecified std::basic_ostream< E, T > &std::basic_ostream< E, T > &offset_ptr< W, X, Y, Z > const &operator<< for offset ptr std::basic_istream< E, T > &std::basic_istream< E, T > &offset_ptr< W, X, Y, Z > &operator>> for offset ptr boost::interprocess::offset_ptr< T1, P1, O1, A1 >const boost::interprocess::offset_ptr< T2, P2, O2, A2 > &Simulation of static_cast between pointers. Never throws. boost::interprocess::offset_ptr< T1, P1, O1, A1 >const boost::interprocess::offset_ptr< T2, P2, O2, A2 > &Simulation of const_cast between pointers. Never throws. boost::interprocess::offset_ptr< T1, P1, O1, A1 >const boost::interprocess::offset_ptr< T2, P2, O2, A2 > &Simulation of dynamic_cast between pointers. Never throws. boost::interprocess::offset_ptr< T1, P1, O1, A1 >const boost::interprocess::offset_ptr< T2, P2, O2, A2 > &Simulation of reinterpret_cast between pointers. Never throws.
Describes permissions class The permissions class represents permissions to be set to shared memory or files, that can be constructed form usual permission representations: a SECURITY_ATTRIBUTES pointer in windows or ORed rwx chmod integer in UNIX. voidSets permissions to default values: A null security attributes pointer for windows or 0644 for UNIX. voidSets permissions to unrestricted access: A null DACL for windows or 0666 for UNIX. voidos_permissions_typeSets permissions from a user provided os-dependent permissions. os_permissions_typeReturns stored os-dependent permissions os_permissions_typeConstructs a permissions object from a user provided os-dependent permissions. Constructs a default permissions object: A null security attributes pointer for windows or 0644 for UNIX.
Describes the object placed in a memory segment that provides named object allocation capabilities for single-segment and multi-segment allocations. boost::interprocess::segment_manager_base< MemoryAlgorithm >This object is placed in the beginning of memory segment and implements the allocation (named or anonymous) of portions of the segment. This object contains two indexes that maintain an association between a name and a portion of the segment.The first index contains the mappings for normal named objects using the char type specified in the template parameter.The second index contains the association for unique instances. The key will be the const char * returned from type_info.name() function for the unique type to be constructed.segment_manager<CharType, MemoryAlgorithm, IndexType> inherits publicly from segment_manager_base<MemoryAlgorithm> and inherits from it many public functions related to anonymous object and raw memory allocation. See segment_manager_base reference to know about those functions. This is the default allocator to allocate types T from this managed segment boost::interprocess::allocator< T, segment_manager > This is the default deleter to delete types T from this managed segment. boost::interprocess::deleter< T, segment_manager > MemoryAlgorithm segment_manager_base_t::void_pointer segment_manager_base_t::size_type segment_manager_base_t::difference_type CharType segment_manager_base< MemoryAlgorithm > segment_manager_base_t::mutex_family transform_iterator< typename named_index_t::const_iterator, named_transform > transform_iterator< typename unique_index_t::const_iterator, unique_transform > const size_type std::pair< T *, size_type >char_ptr_holder_tTries to find a previous named/unique allocation. Returns the address and the object count. On failure the first member of the returned pair is 0. std::pair< T *, size_type >char_ptr_holder_tTries to find a previous named/unique allocation. Returns the address and the object count. On failure the first member of the returned pair is 0. This search is not mutex-protected! Use it only inside atomic_func() calls, where the internal mutex is guaranteed to be locked. construct_proxy< T >::typechar_ptr_holder_tReturns throwing "construct" proxy object construct_proxy< T >::typechar_ptr_holder_tReturns throwing "search or construct" proxy object construct_proxy< T >::typechar_ptr_holder_tconst std::nothrow_t &Returns no throwing "construct" proxy object construct_proxy< T >::typechar_ptr_holder_tconst std::nothrow_t &Returns no throwing "search or construct" proxy object construct_iter_proxy< T >::typechar_ptr_holder_tReturns throwing "construct from iterators" proxy object. construct_iter_proxy< T >::typechar_ptr_holder_tReturns throwing "search or construct from iterators" proxy object construct_iter_proxy< T >::typechar_ptr_holder_tconst std::nothrow_t &Returns no throwing "construct from iterators" proxy object construct_iter_proxy< T >::typechar_ptr_holder_tconst std::nothrow_t &Returns no throwing "search or construct from iterators" proxy object voidFunc &Calls object function blocking recursive interprocess_mutex and guarantees that no new named_alloc or destroy will be executed by any process while executing the object function call boolFunc &Tries to calls a functor guaranteeing that no new construction, search or destruction will be executed by any process while executing the object function call. If the atomic function can't be immediatelly executed because the internal mutex is already locked, returns false. If the functor throws, this function throws. boolchar_ptr_holder_tDestroys a previously created named/unique instance. Returns false if the object was not present. voidconst T *Destroys an anonymous, unique or named object using its address voidsize_typePreallocates needed index resources to optimize the creation of "num" named objects in the managed memory segment. Can throw boost::interprocess::bad_alloc if there is no enough memory. voidsize_typePreallocates needed index resources to optimize the creation of "num" unique objects in the managed memory segment. Can throw boost::interprocess::bad_alloc if there is no enough memory. voidCalls shrink_to_fit in both named and unique object indexes to try to free unused memory from those indexes. size_typeReturns the number of named objects stored in the segment. size_typeReturns the number of unique objects stored in the segment. const_named_iteratorReturns a constant iterator to the beginning of the information about the named allocations performed in this segment manager const_named_iteratorReturns a constant iterator to the end of the information about the named allocations performed in this segment manager const_unique_iteratorReturns a constant iterator to the beginning of the information about the unique allocations performed in this segment manager const_unique_iteratorReturns a constant iterator to the end of the information about the unique allocations performed in this segment manager allocator< T >::typeReturns an instance of the default allocator for type T initialized that allocates memory from this segment manager. deleter< T >::typeReturns an instance of the default deleter for type T that will delete an object constructed in this segment manager. size_typeConstructor of the segment manager "size" is the size of the memory segment where the segment manager is being constructed. Can throw const CharType *const T *Returns the name of an object created with construct/find_or_construct functions. Does not throw size_typeconst T *Returns the length of an object created with construct/find_or_construct functions. Does not throw. instance_typeconst T *Returns is the the name of an object created with construct/find_or_construct functions. Does not throw size_typeObtains the minimum size needed by the segment manager MemoryAlgorithmThis object is the public base class of segment manager. This class only depends on the memory allocation algorithm and implements all the allocation features not related to named or unique objects.Storing a reference to segment_manager forces the holder class to be dependent on index types and character types. When such dependence is not desirable and only anonymous and raw allocations are needed, segment_manager_base is the correct answer. segment_manager_base< MemoryAlgorithm > MemoryAlgorithm::void_pointer MemoryAlgorithm::mutex_family MemoryAlgorithm const size_typeThis constant indicates the payload size associated with each allocation of the memory algorithm size_typeReturns the size of the memory segment size_typeReturns the number of free bytes of the memory segment void *size_typeconst std::nothrow_t &Allocates nbytes bytes. This function is only used in single-segment management. Never throws void *size_typeAllocates nbytes bytes. Throws boost::interprocess::bad_alloc on failure void *size_typesize_typeconst std::nothrow_t &Allocates nbytes bytes. This function is only used in single-segment management. Never throws void *size_typesize_typeAllocates nbytes bytes. This function is only used in single-segment management. Throws bad_alloc when fails voidvoid *Deallocates the bytes allocated with allocate/allocate_many() pointed by addr voidsize_typeIncreases managed memory in extra_size bytes more. This only works with single-segment management. voidDecreases managed memory to the minimum. This only works with single-segment management. boolReturns the result of "all_memory_deallocated()" function of the used memory algorithm boolReturns the result of "check_sanity()" function of the used memory algorithm voidWrites to zero free memory (memory not yet allocated) of the memory algorithm size_typeconst void *Returns the size of the buffer previously allocated pointed by ptr. size_typesize_typeConstructor of the segment_manager_base"size" is the size of the memory segment where the basic segment manager is being constructed."reserved_bytes" is the number of bytes after the end of the memory algorithm object itself that the memory algorithm will exclude from dynamic allocationCan throw size_typesize_typeObtains the minimum size needed by the segment manager
Describes a shared memory object management class. A class that wraps a shared memory mapping that can be used to create mapped regions from the mapped files voidshared_memory_object &Swaps the shared_memory_objects. Does not throw. voidoffset_tSets the size of the shared memory mapping. const char *Returns the name of the shared memory object. booloffset_t &Returns true if the size of the shared memory object can be obtained and writes the size in the passed reference mode_tReturns access mode. mapping_handle_tReturns mapping handle. Never throws. Default constructor. Represents an empty shared_memory_object. create_only_tconst char *mode_tconst permissions &permissions()Creates a shared memory object with name "name" and mode "mode", with the access mode "mode" If the file previously exists, throws an error. open_or_create_tconst char *mode_tconst permissions &permissions()Tries to create a shared memory object with name "name" and mode "mode", with the access mode "mode". If the file previously exists, it tries to open it with mode "mode". Otherwise throws an error. open_only_tconst char *mode_tTries to open a shared memory object with name "name", with the access mode "mode". If the file does not previously exist, it throws an error. shared_memory_object &&Moves the ownership of "moved"'s shared memory object to *this. After the call, "moved" does not represent any shared memory object. Does not throw shared_memory_object &shared_memory_object &&Moves the ownership of "moved"'s shared memory to *this. After the call, "moved" does not represent any shared memory. Does not throw Destroys *this and indicates that the calling process is finished using the resource. All mapped regions are still valid after destruction. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a shared memory object from the system. Returns false on error. Never throws
Describes the functor to delete objects from the segment. A deleter that uses the segment manager's destroy_ptr function to destroy the passed pointer resource.This deleter is used boost::intrusive::pointer_traits< typename SegmentManager::void_pointer >::template rebind_pointer< T >::type voidconst pointer & segment_manager_pointer
Describes an utility to form a shared pointer from this
Describes an intrusive ownership pointer. The intrusive_ptr class template stores a pointer to an object with an embedded reference count. intrusive_ptr is parameterized on T (the type of the object pointed to) and VoidPointer(a void pointer type that defines the type of pointer that intrusive_ptr will store). intrusive_ptr<T, void *> defines a class with a T* member whereas intrusive_ptr<T, offset_ptr<void> > defines a class with a offset_ptr<T> member. Relies on unqualified calls to:void intrusive_ptr_add_ref(T * p) BOOST_NOEXCEPT; void intrusive_ptr_release(T * p) BOOST_NOEXCEPT;with (p != 0)The object is responsible for destroying itself. Provides the type of the internal stored pointer. boost::intrusive::pointer_traits< VoidPointer >::template rebind_pointer< T >::type Provides the type of the stored pointer. T voidRelease internal pointer and set it to 0. If internal pointer is not 0, calls intrusive_ptr_release(to_raw_pointer(m_ptr)). Does not throw pointer &Returns a reference to the internal pointer. Does not throw const pointer &Returns a reference to the internal pointer. Does not throw T &Returns *get(). Does not throw const pointer &Returns *get(). Does not throw pointer &Returns get(). Does not throw unspecified_bool_typeConversion to boolean. Does not throw boolNot operator. Does not throw voidintrusive_ptr &Exchanges the contents of the two smart pointers. Does not throw Constructor. Initializes internal pointer to 0. Does not throw const pointer &booltrueConstructor. Copies pointer and if "p" is not zero and "add_ref" is true calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw intrusive_ptr const &Copy constructor. Copies the internal pointer and if "p" is not zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw intrusive_ptr &&Move constructor. Moves the internal pointer. Does not throw. intrusive_ptr< U, VP > const &Constructor from related. Copies the internal pointer and if "p" is not zero calls intrusive_ptr_add_ref(to_raw_pointer(p)). Does not throw Destructor. Calls reset(). Does not throw. intrusive_ptr &BOOST_COPY_ASSIGN_REF(intrusive_ptr)Assignment operator. Equivalent to intrusive_ptr(r).swap(*this). Does not throw intrusive_ptr &intrusive_ptr &&Move Assignment operator Does not throw intrusive_ptr &intrusive_ptr< U, VP > const &Assignment from related. Equivalent to intrusive_ptr(r).swap(*this). Does not throw intrusive_ptr &pointerAssignment from pointer. Equivalent to intrusive_ptr(r).swap(*this). Does not throw boolintrusive_ptr< T, VP > const &intrusive_ptr< U, VP > const &Returns a.get() == b.get(). Does not throw boolintrusive_ptr< T, VP > const &intrusive_ptr< U, VP > const &Returns a.get() != b.get(). Does not throw boolintrusive_ptr< T, VP > const &const typename intrusive_ptr< T, VP >::pointer &Returns a.get() == b. Does not throw boolintrusive_ptr< T, VP > const &const typename intrusive_ptr< T, VP >::pointer &Returns a.get() != b. Does not throw boolconst typename intrusive_ptr< T, VP >::pointer &intrusive_ptr< T, VP > const &Returns a == b.get(). Does not throw boolconst typename intrusive_ptr< T, VP >::pointer &intrusive_ptr< T, VP > const &Returns a != b.get(). Does not throw boolintrusive_ptr< T, VP > const &intrusive_ptr< T, VP > const &Returns a.get() < b.get(). Does not throw voidintrusive_ptr< T, VP > &intrusive_ptr< T, VP > &Exchanges the contents of the two intrusive_ptrs. Does not throw std::basic_ostream< E, T > &std::basic_ostream< E, T > &intrusive_ptr< Y, VP > const & boost::interprocess::intrusive_ptr< T, VP >::pointerintrusive_ptr< T, VP >Returns p.get(). Does not throw
Describes the smart pointer scoped_ptr Deleterscoped_ptr stores a pointer to a dynamically allocated object. The object pointed to is guaranteed to be deleted, either on destruction of the scoped_ptr, or via an explicit reset. The user can avoid this deletion using release(). scoped_ptr is parameterized on T (the type of the object pointed to) and Deleter (the functor to be executed to delete the internal pointer). The internal pointer will be of the same pointer type as typename Deleter::pointer type (that is, if typename Deleter::pointer is offset_ptr<void>, the internal pointer will be offset_ptr<T>). T Deleter unspecified pointer this_type::* voidconst pointer &0Deletes the object pointed to by the stored pointer and then stores a copy of p. Never throws voidconst pointer &const Deleter &Deletes the object pointed to by the stored pointer and then stores a copy of p and a copy of d. pointerAssigns internal pointer as 0 and returns previous pointer. This will avoid deletion on destructor referenceReturns a reference to the object pointed to by the stored pointer. Never throws. pointer &Returns the internal stored pointer. Never throws. const pointer &Returns the internal stored pointer. Never throws. pointer &Returns the stored pointer. Never throws. const pointer &Returns the stored pointer. Never throws. unspecified_bool_typeConversion to bool Never throws boolReturns true if the stored pointer is 0. Never throws. voidscoped_ptr &Exchanges the internal pointer and deleter with other scoped_ptr Never throws. const pointer &0const Deleter &Deleter()Constructs a scoped_ptr, storing a copy of p(which can be 0) and d. Does not throw. If the stored pointer is not 0, destroys the object pointed to by the stored pointer. calling the operator() of the stored deleter. Never throws voidscoped_ptr< T, D > &scoped_ptr< T, D > &Exchanges the internal pointer and deleter with other scoped_ptr Never throws. scoped_ptr< T, D >::pointerscoped_ptr< T, D > const &Returns a copy of the stored pointer Never throws
Describes the smart pointer shared_ptr This class is used as a base class that allows a shared_ptr to the current object to be obtained from within a member function. enable_shared_from_this defines two member functions called shared_from_this that return a shared_ptr<T> and shared_ptr<T const>, depending on constness, to this. shared_ptr< T, A, D > shared_ptr< T const, A, D > Returns the type of a shared pointer of type T with the allocator boost::interprocess::allocator allocator and boost::interprocess::deleter deleter that can be constructed in the given managed segment type. ManagedMemory::template allocator< void >::type ManagedMemory::template deleter< T >::type shared_ptr< T, void_allocator, deleter > shared_ptr stores a pointer to a dynamically allocated object. The object pointed to is guaranteed to be deleted when the last shared_ptr pointing to it is destroyed or reset.shared_ptr is parameterized on T (the type of the object pointed to), VoidAllocator (the void allocator to be used to allocate the auxiliary data) and Deleter (the deleter whose operator() will be used to delete the object.The internal pointer will be of the same pointer type as typename VoidAllocator::pointer type (that is, if typename VoidAllocator::pointer is offset_ptr<void>, the internal pointer will be offset_ptr<T>).Because the implementation uses reference counting, cycles of shared_ptr instances will not be reclaimed. For example, if main() holds a shared_ptr to A, which directly or indirectly holds a shared_ptr back to A, A's use count will be 2. Destruction of the original shared_ptr will leave A dangling with a use count of 1. Use weak_ptr to "break cycles." T T boost::intrusive::pointer_traits< typename VoidAllocator::pointer >::template rebind_pointer< T >::type unspecified unspecified boost::intrusive::pointer_traits< typename VoidAllocator::pointer >::template rebind_pointer< const Deleter >::type boost::intrusive::pointer_traits< typename VoidAllocator::pointer >::template rebind_pointer< const VoidAllocator >::type voidThis is equivalent to: this_type().swap(*this); voidconst Pointer &const VoidAllocator &VoidAllocator()const Deleter &Deleter()This is equivalent to: this_type(p, a, d).swap(*this); voidshared_ptr< Y, VoidAllocator, Deleter > const &const pointer & referenceReturns a reference to the pointed type pointerReturns the pointer pointing to the owned object pointerReturns the pointer pointing to the owned object boolNot operator. Returns true if this->get() != 0, false otherwise boolReturns use_count() == 1. unique() might be faster than use_count() longReturns the number of shared_ptr objects, *this included, that share ownership with *this, or an unspecified nonnegative value when *this is empty. use_count() is not necessarily efficient. Use only for debugging and testing purposes, not for production code. voidshared_ptr< T, VoidAllocator, Deleter > &Exchanges the contents of the two smart pointers. Constructs an empty shared_ptr. Use_count() == 0 && get()== 0. const pointer &const VoidAllocator &VoidAllocator()const Deleter &Deleter()Constructs a shared_ptr that owns the pointer p. Auxiliary data will be allocated with a copy of a and the object will be deleted with a copy of d. Requirements: Deleter and A's copy constructor must not throw. const shared_ptr &Copy constructs a shared_ptr. If r is empty, constructs an empty shared_ptr. Otherwise, constructs a shared_ptr that shares ownership with r. Never throws. const shared_ptr &const pointer &Constructs a shared_ptr that shares ownership with other and stores p. Postconditions: get() == p && use_count() == r.use_count(). Throws: nothing. shared_ptr< Y, VoidAllocator, Deleter > const &If r is empty, constructs an empty shared_ptr. Otherwise, constructs a shared_ptr that shares ownership with r. Never throws. weak_ptr< Y, VoidAllocator, Deleter > const &Constructs a shared_ptr that shares ownership with r and stores a copy of the pointer stored in r. shared_ptr &&Move-Constructs a shared_ptr that takes ownership of other resource and other is put in default-constructed state. Throws: nothing. shared_ptr &shared_ptr< Y, VoidAllocator, Deleter > const &Equivalent to shared_ptr(r).swap(*this). Never throws shared_ptr &BOOST_COPY_ASSIGN_REF(shared_ptr)Equivalent to shared_ptr(r).swap(*this). Never throws shared_ptr &shared_ptr &&Move-assignment. Equivalent to shared_ptr(other).swap(*this). Never throws boolshared_ptr< T, VoidAllocator, Deleter > const &shared_ptr< U, VoidAllocator2, Deleter2 > const & boolshared_ptr< T, VoidAllocator, Deleter > const &shared_ptr< U, VoidAllocator2, Deleter2 > const & boolshared_ptr< T, VoidAllocator, Deleter > const &shared_ptr< U, VoidAllocator2, Deleter2 > const & voidshared_ptr< T, VoidAllocator, Deleter > &shared_ptr< T, VoidAllocator, Deleter > & shared_ptr< T, VoidAllocator, Deleter >shared_ptr< U, VoidAllocator, Deleter > const & shared_ptr< T, VoidAllocator, Deleter >shared_ptr< U, VoidAllocator, Deleter > const & shared_ptr< T, VoidAllocator, Deleter >shared_ptr< U, VoidAllocator, Deleter > const & T *shared_ptr< T, VoidAllocator, Deleter > const & std::basic_ostream< E, T > &std::basic_ostream< E, T > &shared_ptr< Y, VoidAllocator, Deleter > const & managed_shared_ptr< T, ManagedMemory >::typeT *ManagedMemory &Returns an instance of a shared pointer constructed with the default allocator and deleter from a pointer of type T that has been allocated in the passed managed segment managed_shared_ptr< T, ManagedMemory >::typeT *ManagedMemory &const std::nothrow_t &Returns an instance of a shared pointer constructed with the default allocator and deleter from a pointer of type T that has been allocated in the passed managed segment. Does not throw, return null shared pointer in error.
This header provides utilities to define a unique_ptr that plays nicely with managed segments. Returns the type of a unique pointer of type T with boost::interprocess::deleter deleter that can be constructed in the given managed segment type. boost::movelib::unique_ptr< T, typename ManagedMemory::template deleter< T >::type > managed_unique_ptr< T, ManagedMemory >::typeT *ManagedMemory &Returns an instance of a unique pointer constructed with boost::interproces::deleter from a pointer of type T that has been allocated in the passed managed segment
Describes the smart pointer weak_ptr. Returns the type of a weak pointer of type T with the allocator boost::interprocess::allocator allocator and boost::interprocess::deleter deleter that can be constructed in the given managed segment type. weak_ptr< T, typename ManagedMemory::template allocator< void >::type, typename ManagedMemory::template deleter< T >::type > The weak_ptr class template stores a "weak reference" to an object that's already managed by a shared_ptr. To access the object, a weak_ptr can be converted to a shared_ptr using the shared_ptr constructor or the member function lock. When the last shared_ptr to the object goes away and the object is deleted, the attempt to obtain a shared_ptr from the weak_ptr instances that refer to the deleted object will fail: the constructor will throw an exception of type bad_weak_ptr, and weak_ptr::lock will return an empty shared_ptr.Every weak_ptr meets the CopyConstructible and Assignable requirements of the C++ Standard Library, and so can be used in standard library containers. Comparison operators are supplied so that weak_ptr works with the standard library's associative containers.weak_ptr operations never throw exceptions.The class template is parameterized on T, the type of the object pointed to. T T shared_ptr< T, A, D >Returns: expired()? shared_ptr<T>(): shared_ptr<T>(*this).Throws: nothing. longReturns: 0 if *this is empty; otherwise, the number of shared_ptr objects that share ownership with *this.Throws: nothing.Notes: use_count() is not necessarily efficient. Use only for debugging and testing purposes, not for production code. boolReturns: Returns: use_count() == 0.Throws: nothing.Notes: expired() may be faster than use_count(). voidEffects: Equivalent to: weak_ptr().swap(*this). voidthis_type &Effects: Exchanges the contents of the two smart pointers.Throws: nothing. Effects: Constructs an empty weak_ptr. Postconditions: use_count() == 0. weak_ptr< Y, A, D > const &Effects: If r is empty, constructs an empty weak_ptr; otherwise, constructs a weak_ptr that shares ownership with r as if by storing a copy of the pointer stored in r.Postconditions: use_count() == r.use_count().Throws: nothing. shared_ptr< Y, A, D > const &Effects: If r is empty, constructs an empty weak_ptr; otherwise, constructs a weak_ptr that shares ownership with r as if by storing a copy of the pointer stored in r.Postconditions: use_count() == r.use_count().Throws: nothing. weak_ptr &weak_ptr< Y, A, D > const &Effects: Equivalent to weak_ptr(r).swap(*this).Throws: nothing.Notes: The implementation is free to meet the effects (and the implied guarantees) via different means, without creating a temporary. weak_ptr &shared_ptr< Y, A, D > const &Effects: Equivalent to weak_ptr(r).swap(*this).Throws: nothing.Notes: The implementation is free to meet the effects (and the implied guarantees) via different means, without creating a temporary. boolweak_ptr< T, A, D > const &weak_ptr< U, A2, D2 > const & voidweak_ptr< T, A, D > &weak_ptr< T, A, D > & managed_weak_ptr< T, ManagedMemory >::typeT *ManagedMemory &Returns an instance of a weak pointer constructed with the default allocator and deleter from a pointer of type T that has been allocated in the passed managed segment
This file defines basic_bufferbuf, basic_ibufferstream, basic_obufferstream, and basic_bufferstream classes. These classes represent streamsbufs and streams whose sources or destinations are fixed size character buffers. std::basic_streambuf< CharT, CharTraits >A streambuf class that controls the transmission of elements to and from a basic_xbufferstream. The elements are transmitted from a to a fixed size buffer CharT CharTraits::int_type CharTraits::pos_type CharTraits::off_type CharTraits std::basic_streambuf< char_type, traits_type > std::pair< CharT *, std::size_t >Returns the pointer and size of the internal buffer. Does not throw. voidCharT *std::size_tSets the underlying buffer to a new value Does not throw. std::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Does not throw. CharT *std::size_tstd::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Assigns formatting buffer. Does not throw. std::basic_iostream< CharT, CharTraits >A basic_iostream class that uses a fixed size character buffer as its formatting buffer. std::basic_ios< CharT, CharTraits >::char_type std::basic_ios< char_type, CharTraits >::int_type std::basic_ios< char_type, CharTraits >::pos_type std::basic_ios< char_type, CharTraits >::off_type std::basic_ios< char_type, CharTraits >::traits_type basic_bufferbuf< CharT, CharTraits > *Returns the address of the stored stream buffer. std::pair< CharT *, std::size_t >Returns the pointer and size of the internal buffer. Does not throw. voidCharT *std::size_tSets the underlying buffer to a new value. Resets stream position. Does not throw. std::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Does not throw. CharT *std::size_tstd::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Assigns formatting buffer. Does not throw. std::basic_istream< CharT, CharTraits >A basic_istream class that uses a fixed size character buffer as its formatting buffer. std::basic_ios< CharT, CharTraits >::char_type std::basic_ios< char_type, CharTraits >::int_type std::basic_ios< char_type, CharTraits >::pos_type std::basic_ios< char_type, CharTraits >::off_type std::basic_ios< char_type, CharTraits >::traits_type basic_bufferbuf< CharT, CharTraits > *Returns the address of the stored stream buffer. std::pair< const CharT *, std::size_t >Returns the pointer and size of the internal buffer. Does not throw. voidconst CharT *std::size_tSets the underlying buffer to a new value. Resets stream position. Does not throw. std::ios_base::openmodestd::ios_base::inConstructor. Does not throw. const CharT *std::size_tstd::ios_base::openmodestd::ios_base::inConstructor. Assigns formatting buffer. Does not throw. std::basic_ostream< CharT, CharTraits >A basic_ostream class that uses a fixed size character buffer as its formatting buffer. std::basic_ios< CharT, CharTraits >::char_type std::basic_ios< char_type, CharTraits >::int_type std::basic_ios< char_type, CharTraits >::pos_type std::basic_ios< char_type, CharTraits >::off_type std::basic_ios< char_type, CharTraits >::traits_type basic_bufferbuf< CharT, CharTraits > *Returns the address of the stored stream buffer. std::pair< CharT *, std::size_t >Returns the pointer and size of the internal buffer. Does not throw. voidCharT *std::size_tSets the underlying buffer to a new value. Resets stream position. Does not throw. std::ios_base::openmodestd::ios_base::outConstructor. Does not throw. CharT *std::size_tstd::ios_base::openmodestd::ios_base::outConstructor. Assigns formatting buffer. Does not throw. basic_bufferbuf< char > basic_bufferstream< char > basic_ibufferstream< char > basic_obufferstream< char > basic_bufferbuf< wchar_t > basic_bufferstream< wchar_t > basic_ibufferstream< wchar_t > basic_obufferstream< wchar_t >
This file defines basic_vectorbuf, basic_ivectorstream, basic_ovectorstream, and basic_vectorstreamclasses. These classes represent streamsbufs and streams whose sources or destinations are STL-like vectors that can be swapped with external vectors to avoid unnecessary allocations/copies. std::basic_istream< CharVector::value_type, CharTraits >A basic_istream class that holds a character vector specified by CharVector template parameter as its formatting buffer. The vector must have contiguous storage, like std::vector, boost::interprocess::vector or boost::interprocess::basic_string CharVector std::basic_ios< typename CharVector::value_type, CharTraits >::char_type std::basic_ios< char_type, CharTraits >::int_type std::basic_ios< char_type, CharTraits >::pos_type std::basic_ios< char_type, CharTraits >::off_type std::basic_ios< char_type, CharTraits >::traits_type basic_vectorbuf< CharVector, CharTraits > *Returns the address of the stored stream buffer. voidvector_type &Swaps the underlying vector with the passed vector. This function resets the read position in the stream. Does not throw. const vector_type &Returns a const reference to the internal vector. Does not throw. voidtypename vector_type::size_typeCalls reserve() method of the internal vector. Resets the stream to the first position. Throws if the internals vector's reserve throws. voidCalls clear() method of the internal vector. Resets the stream to the first position. std::ios_base::openmodestd::ios_base::inConstructor. Throws if vector_type default constructor throws. const VectorParameter &std::ios_base::openmodestd::ios_base::inConstructor. Throws if vector_type(const VectorParameter &param) throws. std::basic_ostream< CharVector::value_type, CharTraits >A basic_ostream class that holds a character vector specified by CharVector template parameter as its formatting buffer. The vector must have contiguous storage, like std::vector, boost::interprocess::vector or boost::interprocess::basic_string CharVector std::basic_ios< typename CharVector::value_type, CharTraits >::char_type std::basic_ios< char_type, CharTraits >::int_type std::basic_ios< char_type, CharTraits >::pos_type std::basic_ios< char_type, CharTraits >::off_type std::basic_ios< char_type, CharTraits >::traits_type basic_vectorbuf< CharVector, CharTraits > *Returns the address of the stored stream buffer. voidvector_type &Swaps the underlying vector with the passed vector. This function resets the write position in the stream. Does not throw. const vector_type &Returns a const reference to the internal vector. Does not throw. voidtypename vector_type::size_typeCalls reserve() method of the internal vector. Resets the stream to the first position. Throws if the internals vector's reserve throws. std::ios_base::openmodestd::ios_base::outConstructor. Throws if vector_type default constructor throws. const VectorParameter &std::ios_base::openmodestd::ios_base::outConstructor. Throws if vector_type(const VectorParameter &param) throws. std::basic_streambuf< CharVector::value_type, CharTraits >A streambuf class that controls the transmission of elements to and from a basic_ivectorstream, basic_ovectorstream or basic_vectorstream. It holds a character vector specified by CharVector template parameter as its formatting buffer. The vector must have contiguous storage, like std::vector, boost::interprocess::vector or boost::interprocess::basic_string CharVector CharVector::value_type CharTraits::int_type CharTraits::pos_type CharTraits::off_type CharTraits voidvector_type &Swaps the underlying vector with the passed vector. This function resets the read/write position in the stream. Does not throw. const vector_type &Returns a const reference to the internal vector. Does not throw. voidtypename vector_type::size_typePreallocates memory from the internal vector. Resets the stream to the first position. Throws if the internals vector's memory allocation throws. voidCalls clear() method of the internal vector. Resets the stream to the first position. std::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Throws if vector_type default constructor throws. const VectorParameter &std::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Throws if vector_type(const VectorParameter &param) throws. std::basic_iostream< CharVector::value_type, CharTraits >A basic_iostream class that holds a character vector specified by CharVector template parameter as its formatting buffer. The vector must have contiguous storage, like std::vector, boost::interprocess::vector or boost::interprocess::basic_string CharVector std::basic_ios< typename CharVector::value_type, CharTraits >::char_type std::basic_ios< char_type, CharTraits >::int_type std::basic_ios< char_type, CharTraits >::pos_type std::basic_ios< char_type, CharTraits >::off_type std::basic_ios< char_type, CharTraits >::traits_type basic_vectorbuf< CharVector, CharTraits > * voidvector_type &Swaps the underlying vector with the passed vector. This function resets the read/write position in the stream. Does not throw. const vector_type &Returns a const reference to the internal vector. Does not throw. voidtypename vector_type::size_typeCalls reserve() method of the internal vector. Resets the stream to the first position. Throws if the internals vector's reserve throws. voidCalls clear() method of the internal vector. Resets the stream to the first position. std::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Throws if vector_type default constructor throws. const VectorParameter &std::ios_base::openmodestd::ios_base::in|std::ios_base::outConstructor. Throws if vector_type(const VectorParameter &param) throws.
Describes a class that wraps file locking capabilities. A file lock, is a mutual exclusion utility similar to a mutex using a file. A file lock has sharable and exclusive locking capabilities and can be used with scoped_lock and sharable_lock classes. A file lock can't guarantee synchronization between threads of the same process so just use file locks to synchronize threads from different processes. voidfile_lock &Swaps two file_locks. Does not throw. voidEffects: The calling thread tries to obtain exclusive ownership of the mutex, and if another thread has exclusive, or sharable ownership of the mutex, it waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire exclusive ownership of the mutex without waiting. If no other thread has exclusive, or sharable ownership of the mutex this succeeds. Returns: If it can acquire exclusive ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire exclusive ownership of the mutex waiting if necessary until no other thread has exclusive, or sharable ownership of the mutex or abs_time is reached. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The calling thread releases the exclusive ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain sharable ownership of the mutex, and if another thread has exclusive ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire sharable ownership of the mutex without waiting. If no other thread has exclusive ownership of the mutex this succeeds. Returns: If it can acquire sharable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire sharable ownership of the mutex waiting if necessary until no other thread has exclusive ownership of the mutex or abs_time is reached. Returns: If acquires sharable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have sharable ownership of the mutex. Effects: The calling thread releases the sharable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. Constructs an empty file mapping. Does not throw const char *Opens a file lock. Throws interprocess_exception if the file does not exist or there are no operating system resources. file_lock &&Moves the ownership of "moved"'s file mapping object to *this. After the call, "moved" does not represent any file mapping object. Does not throw file_lock &file_lock &&Moves the ownership of "moved"'s file mapping to *this. After the call, "moved" does not represent any file mapping. Does not throw Closes a file lock. Does not throw.
Describes process-shared variables interprocess_condition class This class is a condition variable that can be placed in shared memory or memory mapped files. Destroys the object of type std::condition_variable_anyUnlike std::condition_variable in C++11, it is NOT safe to invoke the destructor if all threads have been only notified. It is required that they have exited their respective wait functions. voidIf there is a thread waiting on *this, change that thread's state to ready. Otherwise there is no effect. voidChange the state of all threads waiting on *this to ready. If there are no waiting threads, notify_all() has no effect. voidL &Releases the lock on the interprocess_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), and then reacquires the lock. voidL &PrThe same as: while (!pred()) wait(lock) boolL &const boost::posix_time::ptime &Releases the lock on the interprocess_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), or until time abs_time is reached, and then reacquires the lock. Returns: false if time abs_time is reached, otherwise true. boolL &const boost::posix_time::ptime &PrThe same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true; Constructs a interprocess_condition. On error throws interprocess_exception. Destroys *this liberating system resources.
Describes process-shared variables interprocess_condition_any class This class is a condition variable that can be placed in shared memory or memory mapped files.The interprocess_condition_any class is a generalization of interprocess_condition. Whereas interprocess_condition works only on Locks with mutex_type == interprocess_mutex interprocess_condition_any can operate on any user-defined lock that meets the BasicLockable requirements (lock()/unlock() member functions).Unlike std::condition_variable_any in C++11, it is NOT safe to invoke the destructor if all threads have been only notified. It is required that they have exited their respective wait functions. voidIf there is a thread waiting on *this, change that thread's state to ready. Otherwise there is no effect. voidChange the state of all threads waiting on *this to ready. If there are no waiting threads, notify_all() has no effect. voidL &Releases the lock on the interprocess_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), and then reacquires the lock. voidL &PrThe same as: while (!pred()) wait(lock) boolL &const boost::posix_time::ptime &Releases the lock on the interprocess_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), or until time abs_time is reached, and then reacquires the lock. Returns: false if time abs_time is reached, otherwise true. boolL &const boost::posix_time::ptime &PrThe same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true; Constructs a interprocess_condition_any. On error throws interprocess_exception. Destroys *this liberating system resources.
Describes a mutex class that can be placed in memory shared by several processes. Wraps a interprocess_mutex that can be placed in shared memory and can be shared between processes. Allows timed lock tries voidEffects: The calling thread tries to obtain ownership of the mutex, and if another thread has ownership of the mutex, it waits until it can obtain the ownership. If a thread takes ownership of the mutex the mutex must be unlocked by the same mutex. Throws: interprocess_exception on error. boolEffects: The calling thread tries to obtain ownership of the mutex, and if another thread has ownership of the mutex returns immediately. Returns: If the thread acquires ownership of the mutex, returns true, if the another thread has ownership of the mutex, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread will try to obtain exclusive ownership of the mutex if it can do so in until the specified time is reached. If the mutex supports recursive locking, the mutex must be unlocked the same number of times it is locked. Returns: If the thread acquires ownership of the mutex, returns true, if the timeout expires returns false. Throws: interprocess_exception on error. voidEffects: The calling thread releases the exclusive ownership of the mutex. Throws: interprocess_exception on error. Constructor. Throws interprocess_exception on error. Destructor. If any process uses the mutex after the destructor is called the result is undefined. Does not throw.
Describes interprocess_recursive_mutex and shared_recursive_try_mutex classes Wraps a interprocess_mutex that can be placed in shared memory and can be shared between processes. Allows several locking calls by the same process. Allows timed lock tries voidEffects: The calling thread tries to obtain ownership of the mutex, and if another thread has ownership of the mutex, it waits until it can obtain the ownership. If a thread takes ownership of the mutex the mutex must be unlocked by the same mutex. The mutex must be unlocked the same number of times it is locked. Throws: interprocess_exception on error. boolTries to lock the interprocess_mutex, returns false when interprocess_mutex is already locked, returns true when success. The mutex must be unlocked the same number of times it is locked. Throws: interprocess_exception if a severe error is found boolconst boost::posix_time::ptime &Tries to lock the interprocess_mutex, if interprocess_mutex can't be locked before abs_time time, returns false. The mutex must be unlocked the same number of times it is locked. Throws: interprocess_exception if a severe error is found voidEffects: The calling thread releases the exclusive ownership of the mutex. If the mutex supports recursive locking, the mutex must be unlocked the same number of times it is locked. Throws: interprocess_exception on error. Constructor. Throws interprocess_exception on error. Destructor. If any process uses the mutex after the destructor is called the result is undefined. Does not throw.
Describes a interprocess_semaphore class for inter-process synchronization Wraps a interprocess_semaphore that can be placed in shared memory and can be shared between processes. Allows timed lock tries voidIncrements the interprocess_semaphore count. If there are processes/threads blocked waiting for the interprocess_semaphore, then one of these processes will return successfully from its wait function. If there is an error an interprocess_exception exception is thrown. voidDecrements the interprocess_semaphore. If the interprocess_semaphore value is not greater than zero, then the calling process/thread blocks until it can decrement the counter. If there is an error an interprocess_exception exception is thrown. boolDecrements the interprocess_semaphore if the interprocess_semaphore's value is greater than zero and returns true. If the value is not greater than zero returns false. If there is an error an interprocess_exception exception is thrown. boolconst boost::posix_time::ptime &Decrements the interprocess_semaphore if the interprocess_semaphore's value is greater than zero and returns true. Otherwise, waits for the interprocess_semaphore to the posted or the timeout expires. If the timeout expires, the function returns false. If the interprocess_semaphore is posted the function returns true. If there is an error throws sem_exception unsigned intCreates a interprocess_semaphore with the given initial count. interprocess_exception if there is an error. Destroys the interprocess_semaphore. Does not throw
Describes interprocess_sharable_mutex class Wraps a interprocess_sharable_mutex that can be placed in shared memory and can be shared between processes. Allows timed lock tries const interprocess_sharable_mutex & interprocess_sharable_mutex &const interprocess_sharable_mutex & voidEffects: The calling thread tries to obtain exclusive ownership of the mutex, and if another thread has exclusive or sharable ownership of the mutex, it waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire exclusive ownership of the mutex without waiting. If no other thread has exclusive or sharable ownership of the mutex this succeeds. Returns: If it can acquire exclusive ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire exclusive ownership of the mutex waiting if necessary until no other thread has exclusive or sharable ownership of the mutex or abs_time is reached. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The calling thread releases the exclusive ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain sharable ownership of the mutex, and if another thread has exclusive ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire sharable ownership of the mutex without waiting. If no other thread has exclusive ownership of the mutex this succeeds. Returns: If it can acquire sharable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire sharable ownership of the mutex waiting if necessary until no other thread has exclusive ownership of the mutex or abs_time is reached. Returns: If acquires sharable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have sharable ownership of the mutex. Effects: The calling thread releases the sharable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. Constructs the sharable lock. Throws interprocess_exception on error. Destroys the sharable lock. Does not throw.
Describes interprocess_upgradable_mutex class Wraps a interprocess_upgradable_mutex that can be placed in shared memory and can be shared between processes. Allows timed lock tries const interprocess_upgradable_mutex & interprocess_upgradable_mutex &const interprocess_upgradable_mutex & voidEffects: The calling thread tries to obtain exclusive ownership of the mutex, and if another thread has exclusive, sharable or upgradable ownership of the mutex, it waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire exclusive ownership of the mutex without waiting. If no other thread has exclusive, sharable or upgradable ownership of the mutex this succeeds. Returns: If it can acquire exclusive ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire exclusive ownership of the mutex waiting if necessary until no other thread has exclusive, sharable or upgradable ownership of the mutex or abs_time is reached. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The calling thread releases the exclusive ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain sharable ownership of the mutex, and if another thread has exclusive ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire sharable ownership of the mutex without waiting. If no other thread has exclusive ownership of the mutex this succeeds. Returns: If it can acquire sharable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire sharable ownership of the mutex waiting if necessary until no other thread has exclusive ownership of the mutex or abs_time is reached. Returns: If acquires sharable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have sharable ownership of the mutex. Effects: The calling thread releases the sharable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain upgradable ownership of the mutex, and if another thread has exclusive or upgradable ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire upgradable ownership of the mutex without waiting. If no other thread has exclusive or upgradable ownership of the mutex this succeeds. Returns: If it can acquire upgradable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire upgradable ownership of the mutex waiting if necessary until no other thread has exclusive or upgradable ownership of the mutex or abs_time is reached. Returns: If acquires upgradable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have upgradable ownership of the mutex. Effects: The calling thread releases the upgradable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The thread atomically releases exclusive ownership and acquires upgradable ownership. This operation is non-blocking. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The thread atomically releases exclusive ownership and acquires sharable ownership. This operation is non-blocking. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and acquires sharable ownership. This operation is non-blocking. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and acquires exclusive ownership. This operation will block until all threads with sharable ownership release their sharable lock. Throws: An exception derived from interprocess_exception on error. boolPrecondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and tries to acquire exclusive ownership. This operation will fail if there are threads with sharable ownership, but it will maintain upgradable ownership. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. *boolconst boost::posix_time::ptime &Precondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and tries to acquire exclusive ownership, waiting if necessary until abs_time. This operation will fail if there are threads with sharable ownership or timeout reaches, but it will maintain upgradable ownership. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. boolPrecondition: The thread must have sharable ownership of the mutex. Effects: The thread atomically releases sharable ownership and tries to acquire exclusive ownership. This operation will fail if there are threads with sharable or upgradable ownership, but it will maintain sharable ownership. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. boolPrecondition: The thread must have sharable ownership of the mutex. Effects: The thread atomically releases sharable ownership and tries to acquire upgradable ownership. This operation will fail if there are threads with sharable or upgradable ownership, but it will maintain sharable ownership. Returns: If acquires upgradable ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. Constructs the upgradable lock. Throws interprocess_exception on error. Destroys the upgradable lock. Does not throw.
Describes the lock options with associated with interprocess_mutex lock constructors. Type to indicate to a mutex lock constructor that the mutex is already locked. Type to indicate to a mutex lock constructor that must not lock the mutex. Type to indicate to a mutex lock constructor that must try to lock the mutex. const defer_lock_typeAn object indicating that the locking must be deferred. const try_to_lock_typeAn object indicating that a try_lock() operation must be executed. const accept_ownership_typeAn object indicating that the ownership of lockable object must be accepted by the new owner.
Describes a shared interprocess_mutex family fit algorithm used to allocate objects in shared memory. Describes interprocess_mutex family to use with Interprocess framework based on boost::interprocess synchronization objects. boost::interprocess::interprocess_mutex boost::interprocess::interprocess_recursive_mutex Describes interprocess_mutex family to use with Interprocess frameworks based on null operation synchronization objects. boost::interprocess::null_mutex boost::interprocess::null_mutex
Describes a named condition class for inter-process synchronization A global condition variable that can be created by name. This condition variable is designed to work with named_mutex and can't be placed in shared memory or memory mapped files. *voidIf there is a thread waiting on *this, change that thread's state to ready. Otherwise there is no effect. voidChange the state of all threads waiting on *this to ready. If there are no waiting threads, notify_all() has no effect. voidL &Releases the lock on the named_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), and then reacquires the lock. voidL &PrThe same as: while (!pred()) wait(lock) boolL &const boost::posix_time::ptime &Releases the lock on the named_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), or until time abs_time is reached, and then reacquires the lock. Returns: false if time abs_time is reached, otherwise true. boolL &const boost::posix_time::ptime &PrThe same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true; create_only_tconst char *const permissions &permissions()Creates a global condition with a name. If the condition can't be created throws interprocess_exception open_or_create_tconst char *const permissions &permissions()Opens or creates a global condition with a name. If the condition is created, this call is equivalent to named_condition(create_only_t, ... ) If the condition is already created, this call is equivalent named_condition(open_only_t, ... ) Does not throw open_only_tconst char *Opens a global condition with a name if that condition is previously created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named condition from the system. Returns false on error. Never throws.
Describes a named condition class for inter-process synchronization A global condition variable that can be created by name. This condition variable is designed to work with named_mutex and can't be placed in shared memory or memory mapped files. *voidIf there is a thread waiting on *this, change that thread's state to ready. Otherwise there is no effect. voidChange the state of all threads waiting on *this to ready. If there are no waiting threads, notify_all() has no effect. voidL &Releases the lock on the named_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), and then reacquires the lock. voidL &PrThe same as: while (!pred()) wait(lock) boolL &const boost::posix_time::ptime &Releases the lock on the named_mutex object associated with lock, blocks the current thread of execution until readied by a call to this->notify_one() or this->notify_all(), or until time abs_time is reached, and then reacquires the lock. Returns: false if time abs_time is reached, otherwise true. boolL &const boost::posix_time::ptime &PrThe same as: while (!pred()) { if (!timed_wait(lock, abs_time)) return pred(); } return true; create_only_tconst char *const permissions &permissions()Creates a global condition with a name. If the condition can't be created throws interprocess_exception open_or_create_tconst char *const permissions &permissions()Opens or creates a global condition with a name. If the condition is created, this call is equivalent to named_condition_any(create_only_t, ... ) If the condition is already created, this call is equivalent named_condition_any(open_only_t, ... ) Does not throw open_only_tconst char *Opens a global condition with a name if that condition is previously created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named condition from the system. Returns false on error. Never throws.
Describes a named mutex class for inter-process synchronization A mutex with a global name, so it can be found from different processes. This mutex can't be placed in shared memory, and each process should have it's own named_mutex. voidUnlocks a previously locked mutex. voidLocks the mutex, sleeps when the mutex is already locked. Throws interprocess_exception if a severe error is found boolTries to lock the mutex, returns false when the mutex is already locked, returns true when success. Throws interprocess_exception if a severe error is found boolconst boost::posix_time::ptime &Tries to lock the the mutex until time abs_time, Returns false when timeout expires, returns true when locks. Throws interprocess_exception if a severe error is found create_only_tconst char *const permissions &permissions()Creates a global mutex with a name. Throws interprocess_exception on error. open_or_create_tconst char *const permissions &permissions()Opens or creates a global mutex with a name. If the mutex is created, this call is equivalent to named_mutex(create_only_t, ... ) If the mutex is already created, this call is equivalent named_mutex(open_only_t, ... ) Does not throw open_only_tconst char *Opens a global mutex with a name if that mutex is previously created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named mutex from the system. Returns false on error. Never throws.
Describes a named named_recursive_mutex class for inter-process synchronization A recursive mutex with a global name, so it can be found from different processes. This mutex can't be placed in shared memory, and each process should have it's own named_recursive_mutex. voidUnlocks a previously locked named_recursive_mutex. voidLocks named_recursive_mutex, sleeps when named_recursive_mutex is already locked. Throws interprocess_exception if a severe error is found. boolTries to lock the named_recursive_mutex, returns false when named_recursive_mutex is already locked, returns true when success. Throws interprocess_exception if a severe error is found. boolconst boost::posix_time::ptime &Tries to lock the named_recursive_mutex until time abs_time, Returns false when timeout expires, returns true when locks. Throws interprocess_exception if a severe error is found create_only_tconst char *const permissions &permissions()Creates a global recursive_mutex with a name. If the recursive_mutex can't be created throws interprocess_exception open_or_create_tconst char *const permissions &permissions()Opens or creates a global recursive_mutex with a name. If the recursive_mutex is created, this call is equivalent to named_recursive_mutex(create_only_t, ... ) If the recursive_mutex is already created, this call is equivalent named_recursive_mutex(open_only_t, ... ) Does not throw open_only_tconst char *Opens a global recursive_mutex with a name if that recursive_mutex is previously created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named recursive mutex from the system
Describes a named semaphore class for inter-process synchronization A semaphore with a global name, so it can be found from different processes. Allows several resource sharing patterns and efficient acknowledgment mechanisms. voidIncrements the semaphore count. If there are processes/threads blocked waiting for the semaphore, then one of these processes will return successfully from its wait function. If there is an error an interprocess_exception exception is thrown. voidDecrements the semaphore. If the semaphore value is not greater than zero, then the calling process/thread blocks until it can decrement the counter. If there is an error an interprocess_exception exception is thrown. boolDecrements the semaphore if the semaphore's value is greater than zero and returns true. If the value is not greater than zero returns false. If there is an error an interprocess_exception exception is thrown. boolconst boost::posix_time::ptime &Decrements the semaphore if the semaphore's value is greater than zero and returns true. Otherwise, waits for the semaphore to the posted or the timeout expires. If the timeout expires, the function returns false. If the semaphore is posted the function returns true. If there is an error throws sem_exception create_only_tconst char *unsigned intconst permissions &permissions()Creates a global semaphore with a name, and an initial count. If the semaphore can't be created throws interprocess_exception open_or_create_tconst char *unsigned intconst permissions &permissions()Opens or creates a global semaphore with a name, and an initial count. If the semaphore is created, this call is equivalent to named_semaphore(create_only_t, ...) If the semaphore is already created, this call is equivalent to named_semaphore(open_only_t, ... ) and initialCount is ignored. open_only_tconst char *Opens a global semaphore with a name if that semaphore is previously. created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named semaphore from the system. Returns false on error. Never throws.
Describes a named sharable mutex class for inter-process synchronization A sharable mutex with a global name, so it can be found from different processes. This mutex can't be placed in shared memory, and each process should have it's own named sharable mutex. voidEffects: The calling thread tries to obtain exclusive ownership of the mutex, and if another thread has exclusive or sharable ownership of the mutex, it waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire exclusive ownership of the mutex without waiting. If no other thread has exclusive or sharable ownership of the mutex this succeeds. Returns: If it can acquire exclusive ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire exclusive ownership of the mutex waiting if necessary until no other thread has exclusive, or sharable ownership of the mutex or abs_time is reached. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The calling thread releases the exclusive ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain sharable ownership of the mutex, and if another thread has exclusive ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire sharable ownership of the mutex without waiting. If no other thread has exclusive ownership of the mutex this succeeds. Returns: If it can acquire sharable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire sharable ownership of the mutex waiting if necessary until no other thread has exclusive ownership of the mutex or abs_time is reached. Returns: If acquires sharable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have sharable ownership of the mutex. Effects: The calling thread releases the sharable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. create_only_tconst char *const permissions &permissions()Creates a global sharable mutex with a name. If the sharable mutex can't be created throws interprocess_exception open_or_create_tconst char *const permissions &permissions()Opens or creates a global sharable mutex with a name. If the sharable mutex is created, this call is equivalent to named_sharable_mutex(create_only_t, ...) If the sharable mutex is already created, this call is equivalent to named_sharable_mutex(open_only_t, ... ). open_only_tconst char *Opens a global sharable mutex with a name if that sharable mutex is previously. created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named sharable mutex from the system. Returns false on error. Never throws.
Describes a named upgradable mutex class for inter-process synchronization A upgradable mutex with a global name, so it can be found from different processes. This mutex can't be placed in shared memory, and each process should have it's own named upgradable mutex. voidEffects: The calling thread tries to obtain exclusive ownership of the mutex, and if another thread has exclusive, sharable or upgradable ownership of the mutex, it waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire exclusive ownership of the mutex without waiting. If no other thread has exclusive, sharable or upgradable ownership of the mutex this succeeds. Returns: If it can acquire exclusive ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire exclusive ownership of the mutex waiting if necessary until no other thread has exclusive, sharable or upgradable ownership of the mutex or abs_time is reached. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The calling thread releases the exclusive ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain sharable ownership of the mutex, and if another thread has exclusive ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire sharable ownership of the mutex without waiting. If no other thread has exclusive ownership of the mutex this succeeds. Returns: If it can acquire sharable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire sharable ownership of the mutex waiting if necessary until no other thread has exclusive ownership of the mutex or abs_time is reached. Returns: If acquires sharable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have sharable ownership of the mutex. Effects: The calling thread releases the sharable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidEffects: The calling thread tries to obtain upgradable ownership of the mutex, and if another thread has exclusive or upgradable ownership of the mutex, waits until it can obtain the ownership. Throws: interprocess_exception on error. boolEffects: The calling thread tries to acquire upgradable ownership of the mutex without waiting. If no other thread has exclusive or upgradable ownership of the mutex this succeeds. Returns: If it can acquire upgradable ownership immediately returns true. If it has to wait, returns false. Throws: interprocess_exception on error. boolconst boost::posix_time::ptime &Effects: The calling thread tries to acquire upgradable ownership of the mutex waiting if necessary until no other thread has exclusive or upgradable ownership of the mutex or abs_time is reached. Returns: If acquires upgradable ownership, returns true. Otherwise returns false. Throws: interprocess_exception on error. voidPrecondition: The thread must have upgradable ownership of the mutex. Effects: The calling thread releases the upgradable ownership of the mutex. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The thread atomically releases exclusive ownership and acquires upgradable ownership. This operation is non-blocking. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have exclusive ownership of the mutex. Effects: The thread atomically releases exclusive ownership and acquires sharable ownership. This operation is non-blocking. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and acquires sharable ownership. This operation is non-blocking. Throws: An exception derived from interprocess_exception on error. voidPrecondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and acquires exclusive ownership. This operation will block until all threads with sharable ownership release it. Throws: An exception derived from interprocess_exception on error. boolPrecondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and tries to acquire exclusive ownership. This operation will fail if there are threads with sharable ownership, but it will maintain upgradable ownership. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. boolconst boost::posix_time::ptime &Precondition: The thread must have upgradable ownership of the mutex. Effects: The thread atomically releases upgradable ownership and tries to acquire exclusive ownership, waiting if necessary until abs_time. This operation will fail if there are threads with sharable ownership or timeout reaches, but it will maintain upgradable ownership. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. boolPrecondition: The thread must have sharable ownership of the mutex. Effects: The thread atomically releases sharable ownership and tries to acquire exclusive ownership. This operation will fail if there are threads with sharable or upgradable ownership, but it will maintain sharable ownership. Returns: If acquires exclusive ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. boolPrecondition: The thread must have sharable ownership of the mutex. Effects: The thread atomically releases sharable ownership and tries to acquire upgradable ownership. This operation will fail if there are threads with sharable or upgradable ownership, but it will maintain sharable ownership. Returns: If acquires upgradable ownership, returns true. Otherwise returns false. Throws: An exception derived from interprocess_exception on error. create_only_tconst char *const permissions &permissions()Creates a global upgradable mutex with a name. If the upgradable mutex can't be created throws interprocess_exception open_or_create_tconst char *const permissions &permissions()Opens or creates a global upgradable mutex with a name. If the upgradable mutex is created, this call is equivalent to named_upgradable_mutex(create_only_t, ...) If the upgradable mutex is already created, this call is equivalent to named_upgradable_mutex(open_only_t, ... ). open_only_tconst char *Opens a global upgradable mutex with a name if that upgradable mutex is previously. created. If it is not previously created this function throws interprocess_exception. Destroys *this and indicates that the calling process is finished using the resource. The destructor function will deallocate any system resources allocated by the system for use by this process for this resource. The resource can still be opened again calling the open constructor overload. To erase the resource from the system use remove(). boolconst char *Erases a named upgradable mutex from the system. Returns false on error. Never throws.
Describes null_mutex classes Implements a mutex that simulates a mutex without doing any operation and simulates a successful operation. voidSimulates a mutex lock() operation. Empty function. boolSimulates a mutex try_lock() operation. Equivalent to "return true;" boolconst boost::posix_time::ptime &Simulates a mutex timed_lock() operation. Equivalent to "return true;" voidSimulates a mutex unlock() operation. Empty function. voidSimulates a mutex lock_sharable() operation. Empty function. boolSimulates a mutex try_lock_sharable() operation. Equivalent to "return true;" boolconst boost::posix_time::ptime &Simulates a mutex timed_lock_sharable() operation. Equivalent to "return true;" voidSimulates a mutex unlock_sharable() operation. Empty function. voidSimulates a mutex lock_upgradable() operation. Empty function. boolSimulates a mutex try_lock_upgradable() operation. Equivalent to "return true;" boolconst boost::posix_time::ptime &Simulates a mutex timed_lock_upgradable() operation. Equivalent to "return true;" voidSimulates a mutex unlock_upgradable() operation. Empty function. voidSimulates unlock_and_lock_upgradable(). Empty function. voidSimulates unlock_and_lock_sharable(). Empty function. voidSimulates unlock_upgradable_and_lock_sharable(). Empty function. voidSimulates unlock_upgradable_and_lock(). Empty function. boolSimulates try_unlock_upgradable_and_lock(). Equivalent to "return true;" boolconst boost::posix_time::ptime &Simulates timed_unlock_upgradable_and_lock(). Equivalent to "return true;" boolSimulates try_unlock_sharable_and_lock(). Equivalent to "return true;" boolSimulates try_unlock_sharable_and_lock_upgradable(). Equivalent to "return true;" Constructor. Empty. Destructor. Empty.
Describes the scoped_lock class. scoped_lock is meant to carry out the tasks for locking, unlocking, try-locking and timed-locking (recursive or not) for the Mutex. The Mutex need not supply all of this functionality. If the client of scoped_lock<Mutex> does not use functionality which the Mutex does not supply, no harm is done. Mutex ownership transfer is supported through the syntax of move semantics. Ownership transfer is allowed both by construction and assignment. The scoped_lock does not support copy semantics. A compile time error results if copy construction or copy assignment is attempted. Mutex ownership can also be moved from an upgradable_lock and sharable_lock via constructor. In this role, scoped_lock shares the same functionality as a write_lock. Mutex voidEffects: If mutex() == 0 or if already locked, throws a lock_exception() exception. Calls lock() on the referenced mutex. Postconditions: owns() == true. Notes: The scoped_lock changes from a state of not owning the mutex, to owning the mutex, blocking if necessary. *boolEffects: If mutex() == 0 or if already locked, throws a lock_exception() exception. Calls try_lock() on the referenced mutex. Postconditions: owns() == the value returned from mutex()->try_lock(). Notes: The scoped_lock changes from a state of not owning the mutex, to owning the mutex, but only if blocking was not required. If the mutex_type does not support try_lock(), this function will fail at compile time if instantiated, but otherwise have no effect. *boolconst boost::posix_time::ptime &Effects: If mutex() == 0 or if already locked, throws a lock_exception() exception. Calls timed_lock(abs_time) on the referenced mutex. Postconditions: owns() == the value returned from mutex()-> timed_lock(abs_time). Notes: The scoped_lock changes from a state of not owning the mutex, to owning the mutex, but only if it can obtain ownership by the specified time. If the mutex_type does not support timed_lock (), this function will fail at compile time if instantiated, but otherwise have no effect. *voidEffects: If mutex() == 0 or if not locked, throws a lock_exception() exception. Calls unlock() on the referenced mutex. Postconditions: owns() == false. Notes: The scoped_lock changes from a state of owning the mutex, to not owning the mutex. boolEffects: Returns true if this scoped_lock has acquired the referenced mutex. unspecified_bool_typeConversion to bool. Returns owns(). mutex_type *Effects: Returns a pointer to the referenced mutex, or 0 if there is no mutex to reference. mutex_type *Effects: Returns a pointer to the referenced mutex, or 0 if there is no mutex to reference. Postconditions: mutex() == 0 and owns() == false. voidscoped_lock< mutex_type > &Effects: Swaps state with moved lock. Throws: Nothing. Effects: Default constructs a scoped_lock. Postconditions: owns() == false and mutex() == 0. mutex_type &Effects: m.lock(). Postconditions: owns() == true and mutex() == &m. Notes: The constructor will take ownership of the mutex. If another thread already owns the mutex, this thread will block until the mutex is released. Whether or not this constructor handles recursive locking depends upon the mutex. mutex_type &defer_lock_typePostconditions: owns() == false, and mutex() == &m. Notes: The constructor will not take ownership of the mutex. There is no effect required on the referenced mutex. mutex_type &accept_ownership_typePostconditions: owns() == true, and mutex() == &m. Notes: The constructor will suppose that the mutex is already locked. There is no effect required on the referenced mutex. mutex_type &try_to_lock_typeEffects: m.try_lock(). Postconditions: mutex() == &m. owns() == the return value of the m.try_lock() executed within the constructor. Notes: The constructor will take ownership of the mutex if it can do so without waiting. Whether or not this constructor handles recursive locking depends upon the mutex. If the mutex_type does not support try_lock, this constructor will fail at compile time if instantiated, but otherwise have no effect. mutex_type &const boost::posix_time::ptime &Effects: m.timed_lock(abs_time). Postconditions: mutex() == &m. owns() == the return value of the m.timed_lock(abs_time) executed within the constructor. Notes: The constructor will take ownership of the mutex if it can do it until abs_time is reached. Whether or not this constructor handles recursive locking depends upon the mutex. If the mutex_type does not support try_lock, this constructor will fail at compile time if instantiated, but otherwise have no effect. scoped_lock &&Postconditions: mutex() == the value scop.mutex() had before the constructor executes. s1.mutex() == 0. owns() == the value of scop.owns() before the constructor executes. scop.owns(). Notes: If the scop scoped_lock owns the mutex, ownership is moved to thisscoped_lock with no blocking. If the scop scoped_lock does not own the mutex, then neither will this scoped_lock. Only a moved scoped_lock's will match this signature. An non-moved scoped_lock can be moved with the expression: "boost::move(lock);". This constructor does not alter the state of the mutex, only potentially who owns it. upgradable_lock< T > &&unspecified0Effects: If upgr.owns() then calls unlock_upgradable_and_lock() on the referenced mutex. upgr.release() is called. Postconditions: mutex() == the value upgr.mutex() had before the construction. upgr.mutex() == 0. owns() == upgr.owns() before the construction. upgr.owns() == false after the construction. Notes: If upgr is locked, this constructor will lock this scoped_lock while unlocking upgr. If upgr is unlocked, then this scoped_lock will be unlocked as well. Only a moved upgradable_lock's will match this signature. An non-moved upgradable_lock can be moved with the expression: "boost::move(lock);" This constructor may block if other threads hold a sharable_lock on this mutex (sharable_lock's can share ownership with an upgradable_lock). upgradable_lock< T > &&try_to_lock_typeunspecified0Effects: If upgr.owns() then calls try_unlock_upgradable_and_lock() on the referenced mutex: a)if try_unlock_upgradable_and_lock() returns true then mutex() obtains the value from upgr.release() and owns() is set to true. b)if try_unlock_upgradable_and_lock() returns false then upgr is unaffected and this scoped_lock construction as the same effects as a default construction. c)Else upgr.owns() is false. mutex() obtains the value from upgr.release() and owns() is set to false Notes: This construction will not block. It will try to obtain mutex ownership from upgr immediately, while changing the lock type from a "read lock" to a "write lock". If the "read lock" isn't held in the first place, the mutex merely changes type to an unlocked "write lock". If the "read lock" is held, then mutex transfer occurs only if it can do so in a non-blocking manner. upgradable_lock< T > &&boost::posix_time::ptime &unspecified0Effects: If upgr.owns() then calls timed_unlock_upgradable_and_lock(abs_time) on the referenced mutex: a)if timed_unlock_upgradable_and_lock(abs_time) returns true then mutex() obtains the value from upgr.release() and owns() is set to true. b)if timed_unlock_upgradable_and_lock(abs_time) returns false then upgr is unaffected and this scoped_lock construction as the same effects as a default construction. c)Else upgr.owns() is false. mutex() obtains the value from upgr.release() and owns() is set to false Notes: This construction will not block. It will try to obtain mutex ownership from upgr immediately, while changing the lock type from a "read lock" to a "write lock". If the "read lock" isn't held in the first place, the mutex merely changes type to an unlocked "write lock". If the "read lock" is held, then mutex transfer occurs only if it can do so in a non-blocking manner. sharable_lock< T > &&try_to_lock_typeunspecified0Effects: If shar.owns() then calls try_unlock_sharable_and_lock() on the referenced mutex. a)if try_unlock_sharable_and_lock() returns true then mutex() obtains the value from shar.release() and owns() is set to true. b)if try_unlock_sharable_and_lock() returns false then shar is unaffected and this scoped_lock construction has the same effects as a default construction. c)Else shar.owns() is false. mutex() obtains the value from shar.release() and owns() is set to false Notes: This construction will not block. It will try to obtain mutex ownership from shar immediately, while changing the lock type from a "read lock" to a "write lock". If the "read lock" isn't held in the first place, the mutex merely changes type to an unlocked "write lock". If the "read lock" is held, then mutex transfer occurs only if it can do so in a non-blocking manner. Effects: if (owns()) mp_mutex->unlock(). Notes: The destructor behavior ensures that the mutex lock is not leaked. scoped_lock &scoped_lock &&Effects: If owns() before the call, then unlock() is called on mutex(). *this gets the state of scop and scop gets set to a default constructed state. Notes: With a recursive mutex it is possible that both this and scop own the same mutex before the assignment. In this case, this will own the mutex after the assignment (and scop will not), but the mutex's lock count will be decremented by one.
Describes the upgradable_lock class that serves to acquire the upgradable lock of a mutex. sharable_lock is meant to carry out the tasks for sharable-locking (such as read-locking), unlocking, try-sharable-locking and timed-sharable-locking (recursive or not) for the Mutex. The Mutex need not supply all of this functionality. If the client of sharable_lock<Mutex> does not use functionality which the Mutex does not supply, no harm is done. Mutex ownership can be shared among sharable_locks, and a single upgradable_lock. sharable_lock does not support copy semantics. But sharable_lock supports ownership transfer from an sharable_lock, upgradable_lock and scoped_lock via transfer_lock syntax. SharableMutex voidEffects: If mutex() == 0 or already locked, throws a lock_exception() exception. Calls lock_sharable() on the referenced mutex. Postconditions: owns() == true. Notes: The sharable_lock changes from a state of not owning the mutex, to owning the mutex, blocking if necessary. boolEffects: If mutex() == 0 or already locked, throws a lock_exception() exception. Calls try_lock_sharable() on the referenced mutex. Postconditions: owns() == the value returned from mutex()->try_lock_sharable(). Notes: The sharable_lock changes from a state of not owning the mutex, to owning the mutex, but only if blocking was not required. If the mutex_type does not support try_lock_sharable(), this function will fail at compile time if instantiated, but otherwise have no effect. boolconst boost::posix_time::ptime &Effects: If mutex() == 0 or already locked, throws a lock_exception() exception. Calls timed_lock_sharable(abs_time) on the referenced mutex. Postconditions: owns() == the value returned from mutex()->timed_lock_sharable(elps_time). Notes: The sharable_lock changes from a state of not owning the mutex, to owning the mutex, but only if it can obtain ownership within the specified time interval. If the mutex_type does not support timed_lock_sharable(), this function will fail at compile time if instantiated, but otherwise have no effect. voidEffects: If mutex() == 0 or not locked, throws a lock_exception() exception. Calls unlock_sharable() on the referenced mutex. Postconditions: owns() == false. Notes: The sharable_lock changes from a state of owning the mutex, to not owning the mutex. boolEffects: Returns true if this scoped_lock has acquired the referenced mutex. unspecified_bool_typeConversion to bool. Returns owns(). mutex_type *Effects: Returns a pointer to the referenced mutex, or 0 if there is no mutex to reference. mutex_type *Effects: Returns a pointer to the referenced mutex, or 0 if there is no mutex to reference. Postconditions: mutex() == 0 and owns() == false. voidsharable_lock< mutex_type > &Effects: Swaps state with moved lock. Throws: Nothing. Effects: Default constructs a sharable_lock. Postconditions: owns() == false and mutex() == 0. mutex_type &Effects: m.lock_sharable(). Postconditions: owns() == true and mutex() == &m. Notes: The constructor will take sharable-ownership of the mutex. If another thread already owns the mutex with exclusive ownership (scoped_lock), this thread will block until the mutex is released. If another thread owns the mutex with sharable or upgradable ownership, then no blocking will occur. Whether or not this constructor handles recursive locking depends upon the mutex. mutex_type &defer_lock_typePostconditions: owns() == false, and mutex() == &m. Notes: The constructor will not take ownership of the mutex. There is no effect required on the referenced mutex. mutex_type &accept_ownership_typePostconditions: owns() == true, and mutex() == &m. Notes: The constructor will suppose that the mutex is already sharable locked. There is no effect required on the referenced mutex. mutex_type &try_to_lock_typeEffects: m.try_lock_sharable() Postconditions: mutex() == &m. owns() == the return value of the m.try_lock_sharable() executed within the constructor. Notes: The constructor will take sharable-ownership of the mutex if it can do so without waiting. Whether or not this constructor handles recursive locking depends upon the mutex. If the mutex_type does not support try_lock_sharable, this constructor will fail at compile time if instantiated, but otherwise have no effect. mutex_type &const boost::posix_time::ptime &Effects: m.timed_lock_sharable(abs_time) Postconditions: mutex() == &m. owns() == the return value of the m.timed_lock_sharable() executed within the constructor. Notes: The constructor will take sharable-ownership of the mutex if it can do so within the time specified. Whether or not this constructor handles recursive locking depends upon the mutex. If the mutex_type does not support timed_lock_sharable, this constructor will fail at compile time if instantiated, but otherwise have no effect. sharable_lock< mutex_type > &&Postconditions: mutex() == upgr.mutex(). owns() == the value of upgr.owns() before the construction. upgr.owns() == false after the construction. Notes: If the upgr sharable_lock owns the mutex, ownership is moved to this sharable_lock with no blocking. If the upgr sharable_lock does not own the mutex, then neither will this sharable_lock. Only a moved sharable_lock's will match this signature. An non-moved sharable_lock can be moved with the expression: "boost::move(lock);". This constructor does not alter the state of the mutex, only potentially who owns it. upgradable_lock< T > &&unspecified0Effects: If upgr.owns() then calls unlock_upgradable_and_lock_sharable() on the referenced mutex. Postconditions: mutex() == the value upgr.mutex() had before the construction. upgr.mutex() == 0 owns() == the value of upgr.owns() before construction. upgr.owns() == false after the construction. Notes: If upgr is locked, this constructor will lock this sharable_lock while unlocking upgr. Only a moved sharable_lock's will match this signature. An non-moved upgradable_lock can be moved with the expression: "boost::move(lock);". scoped_lock< T > &&unspecified0Effects: If scop.owns() then calls unlock_and_lock_sharable() on the referenced mutex. Postconditions: mutex() == the value scop.mutex() had before the construction. scop.mutex() == 0 owns() == scop.owns() before the constructor. After the construction, scop.owns() == false. Notes: If scop is locked, this constructor will transfer the exclusive ownership to a sharable-ownership of this sharable_lock. Only a moved scoped_lock's will match this signature. An non-moved scoped_lock can be moved with the expression: "boost::move(lock);". Effects: if (owns()) mp_mutex->unlock_sharable(). Notes: The destructor behavior ensures that the mutex lock is not leaked. sharable_lock &sharable_lock< mutex_type > &&Effects: If owns() before the call, then unlock_sharable() is called on mutex(). *this gets the state of upgr and upgr gets set to a default constructed state. Notes: With a recursive mutex it is possible that both this and upgr own the mutex before the assignment. In this case, this will own the mutex after the assignment (and upgr will not), but the mutex's lock count will be decremented by one.
Describes the upgradable_lock class that serves to acquire the upgradable lock of a mutex. upgradable_lock is meant to carry out the tasks for read-locking, unlocking, try-read-locking and timed-read-locking (recursive or not) for the Mutex. Additionally the upgradable_lock can transfer ownership to a scoped_lock using transfer_lock syntax. The Mutex need not supply all of the functionality. If the client of upgradable_lock<Mutex> does not use functionality which the Mutex does not supply, no harm is done. Mutex ownership can be shared among read_locks, and a single upgradable_lock. upgradable_lock does not support copy semantics. However upgradable_lock supports ownership transfer from a upgradable_locks or scoped_locks via transfer_lock syntax. UpgradableMutex voidEffects: If mutex() == 0 or if already locked, throws a lock_exception() exception. Calls lock_upgradable() on the referenced mutex. Postconditions: owns() == true. Notes: The sharable_lock changes from a state of not owning the mutex, to owning the mutex, blocking if necessary. boolEffects: If mutex() == 0 or if already locked, throws a lock_exception() exception. Calls try_lock_upgradable() on the referenced mutex. Postconditions: owns() == the value returned from mutex()->try_lock_upgradable(). Notes: The upgradable_lock changes from a state of not owning the mutex, to owning the mutex, but only if blocking was not required. If the mutex_type does not support try_lock_upgradable(), this function will fail at compile time if instantiated, but otherwise have no effect. boolconst boost::posix_time::ptime &Effects: If mutex() == 0 or if already locked, throws a lock_exception() exception. Calls timed_lock_upgradable(abs_time) on the referenced mutex. Postconditions: owns() == the value returned from mutex()->timed_lock_upgradable(abs_time). Notes: The upgradable_lock changes from a state of not owning the mutex, to owning the mutex, but only if it can obtain ownership within the specified time. If the mutex_type does not support timed_lock_upgradable(abs_time), this function will fail at compile time if instantiated, but otherwise have no effect. voidEffects: If mutex() == 0 or if not locked, throws a lock_exception() exception. Calls unlock_upgradable() on the referenced mutex. Postconditions: owns() == false. Notes: The upgradable_lock changes from a state of owning the mutex, to not owning the mutex. boolEffects: Returns true if this scoped_lock has acquired the referenced mutex. unspecified_bool_typeConversion to bool. Returns owns(). mutex_type *Effects: Returns a pointer to the referenced mutex, or 0 if there is no mutex to reference. mutex_type *Effects: Returns a pointer to the referenced mutex, or 0 if there is no mutex to reference. Postconditions: mutex() == 0 and owns() == false. voidupgradable_lock< mutex_type > &Effects: Swaps state with moved lock. Throws: Nothing. Effects: Default constructs a upgradable_lock. Postconditions: owns() == false and mutex() == 0. mutex_type & mutex_type &defer_lock_typePostconditions: owns() == false, and mutex() == &m. Notes: The constructor will not take ownership of the mutex. There is no effect required on the referenced mutex. mutex_type &accept_ownership_typePostconditions: owns() == true, and mutex() == &m. Notes: The constructor will suppose that the mutex is already upgradable locked. There is no effect required on the referenced mutex. mutex_type &try_to_lock_typeEffects: m.try_lock_upgradable(). Postconditions: mutex() == &m. owns() == the return value of the m.try_lock_upgradable() executed within the constructor. Notes: The constructor will take upgradable-ownership of the mutex if it can do so without waiting. Whether or not this constructor handles recursive locking depends upon the mutex. If the mutex_type does not support try_lock_upgradable, this constructor will fail at compile time if instantiated, but otherwise have no effect. mutex_type &const boost::posix_time::ptime &Effects: m.timed_lock_upgradable(abs_time) Postconditions: mutex() == &m. owns() == the return value of the m.timed_lock_upgradable() executed within the constructor. Notes: The constructor will take upgradable-ownership of the mutex if it can do so within the time specified. Whether or not this constructor handles recursive locking depends upon the mutex. If the mutex_type does not support timed_lock_upgradable, this constructor will fail at compile time if instantiated, but otherwise have no effect. upgradable_lock< mutex_type > &&Effects: No effects on the underlying mutex. Postconditions: mutex() == the value upgr.mutex() had before the construction. upgr.mutex() == 0. owns() == upgr.owns() before the construction. upgr.owns() == false. Notes: If upgr is locked, this constructor will lock this upgradable_lock while unlocking upgr. If upgr is unlocked, then this upgradable_lock will be unlocked as well. Only a moved upgradable_lock's will match this signature. An non-moved upgradable_lock can be moved with the expression: "boost::move(lock);". This constructor does not alter the state of the mutex, only potentially who owns it. scoped_lock< T > &&unspecified0Effects: If scop.owns(), m_.unlock_and_lock_upgradable(). Postconditions: mutex() == the value scop.mutex() had before the construction. scop.mutex() == 0. owns() == scop.owns() before the constructor. After the construction, scop.owns() == false. Notes: If scop is locked, this constructor will transfer the exclusive-ownership to an upgradable-ownership of this upgradable_lock. Only a moved sharable_lock's will match this signature. An non-moved sharable_lock can be moved with the expression: "boost::move(lock);". sharable_lock< T > &&try_to_lock_typeunspecified0Effects: If shar.owns() then calls try_unlock_sharable_and_lock_upgradable() on the referenced mutex. a)if try_unlock_sharable_and_lock_upgradable() returns true then mutex() obtains the value from shar.release() and owns() is set to true. b)if try_unlock_sharable_and_lock_upgradable() returns false then shar is unaffected and this upgradable_lock construction has the same effects as a default construction. c)Else shar.owns() is false. mutex() obtains the value from shar.release() and owns() is set to false. Notes: This construction will not block. It will try to obtain mutex ownership from shar immediately, while changing the lock type from a "read lock" to an "upgradable lock". If the "read lock" isn't held in the first place, the mutex merely changes type to an unlocked "upgradable lock". If the "read lock" is held, then mutex transfer occurs only if it can do so in a non-blocking manner. Effects: if (owns()) m_->unlock_upgradable(). Notes: The destructor behavior ensures that the mutex lock is not leaked. upgradable_lock &upgradable_lock &&Effects: If owns(), then unlock_upgradable() is called on mutex(). *this gets the state of upgr and upgr gets set to a default constructed state. Notes: With a recursive mutex it is possible that both this and upgr own the mutex before the assignment. In this case, this will own the mutex after the assignment (and upgr will not), but the mutex's upgradable lock count will be decremented by one.
Describes a class representing a native windows shared memory. A class that wraps the native Windows shared memory that is implemented as a file mapping of the paging file. Unlike shared_memory_object, windows_shared_memory has no kernel persistence and the shared memory is destroyed when all processes destroy all their windows_shared_memory objects and mapped regions for the same shared memory or the processes end/crash.Warning: Windows native shared memory and interprocess portable shared memory (boost::interprocess::shared_memory_object) can't communicate between them. voidwindows_shared_memory &Swaps to shared_memory_objects. Does not throw. const char *Returns the name of the shared memory. mode_tReturns access mode. mapping_handle_tReturns the mapping handle. Never throws. offset_tReturns the size of the windows shared memory. It will be a 4K rounded size of the "size" passed in the constructor. Default constructor. Represents an empty windows_shared_memory. create_only_tconst char *mode_tstd::size_tconst permissions &permissions()Creates a new native shared memory with name "name" and at least size "size", with the access mode "mode". If the file previously exists, throws an error. open_or_create_tconst char *mode_tstd::size_tconst permissions &permissions()Tries to create a shared memory object with name "name" and at least size "size", with the access mode "mode". If the file previously exists, it tries to open it with mode "mode". Otherwise throws an error. open_only_tconst char *mode_tTries to open a shared memory object with name "name", with the access mode "mode". If the file does not previously exist, it throws an error. windows_shared_memory &&Moves the ownership of "moved"'s shared memory object to *this. After the call, "moved" does not represent any shared memory object. Does not throw windows_shared_memory &windows_shared_memory &&Moves the ownership of "moved"'s shared memory to *this. After the call, "moved" does not represent any shared memory. Does not throw Destroys *this. All mapped regions are still valid after destruction. When all mapped regions and windows_shared_memory objects referring the shared memory are destroyed, the operating system will destroy the shared memory.
Describes a class representing a xsi key type. A class that wraps XSI (System V) key_t type. This type calculates key_t from path and id using ftok, sets key to a specified value, or sets key to IPC_PRIVATE using the default constructor. key_tReturns the internal key_t value. Default constructor. Represents a private xsi_key. key_tCreates a new XSI key using a specified value. Constructor is explicit to avoid ambiguity with shmid. const char *boost::uint8_tCreates a new XSI shared memory with a key obtained from a call to ftok (with path "path" and id "id"), of size "size" and permissions "perm". If the shared memory previously exists, throws an error.
Describes a class representing a native xsi shared memory. A class that wraps XSI (System V) shared memory. Unlike shared_memory_object, xsi_shared_memory needs a valid xsi_key to identify a shared memory object.Warning: XSI shared memory and interprocess portable shared memory (boost::interprocess::shared_memory_object) can't communicate between them. voidxsi_shared_memory &Swaps two xsi_shared_memorys. Does not throw. intReturns the shared memory ID that identifies the shared memory mapping_handle_tReturns the mapping handle. Never throws Default constructor. Represents an empty xsi_shared_memory. open_only_tintInitializes *this with a shmid previously obtained (possibly from another process) This lower-level initializer allows shared memory mapping without having a key. create_only_tconst xsi_key &std::size_tconst permissions &permissions()Creates a new XSI shared memory from 'key', with size "size" and permissions "perm". If the shared memory previously exists, throws an error. open_or_create_tconst xsi_key &std::size_tconst permissions &permissions()Opens an existing shared memory with identifier 'key' or creates a new XSI shared memory from identifier 'key', with size "size" and permissions "perm". open_only_tconst xsi_key &Tries to open a XSI shared memory with identifier 'key' If the shared memory does not previously exist, it throws an error. xsi_shared_memory &&Moves the ownership of "moved"'s shared memory object to *this. After the call, "moved" does not represent any shared memory object. Does not throw xsi_shared_memory &xsi_shared_memory &&Moves the ownership of "moved"'s shared memory to *this. After the call, "moved" does not represent any shared memory. Does not throw Destroys *this. The shared memory won't be destroyed, just this connection to it. Use remove() to destroy the shared memory. boolintErases the XSI shared memory object identified by shmid from the system. Returns false on error. Never throws