STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Classes | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
concrt.h File Reference
#include <crtdefs.h>
#include <exception>
#include <sal.h>
#include <limits.h>
#include <crtdbg.h>
#include <guiddef.h>
#include <intrin.h>
#include <new>

Go to the source code of this file.

Classes

struct  Concurrency::details::_AllocBase
 
class  Concurrency::details::_Context
 
class  Concurrency::details::_Scheduler
 
class  Concurrency::details::_CurrentScheduler
 
struct  Concurrency::details::_Subatomic_impl< _Size >
 
struct  Concurrency::details::_Subatomic_impl< 4 >
 
class  Concurrency::details::_Subatomic< _Ty >
 
class  Concurrency::details::_Interruption_exception
 
class  Concurrency::details::_SpinLock
 
struct  Concurrency::details::_SpinCount
 
class  Concurrency::details::_SpinWait< _YieldCount >
 Implements busy wait with no backoff More...
 
class  Concurrency::details::_ReentrantBlockingLock
 
class  Concurrency::details::_ReentrantBlockingLock::_Scoped_lock
 
class  Concurrency::details::_ReentrantLock
 
class  Concurrency::details::_ReentrantLock::_Scoped_lock
 
class  Concurrency::details::_NonReentrantBlockingLock
 
class  Concurrency::details::_NonReentrantBlockingLock::_Scoped_lock
 
class  Concurrency::details::_ReaderWriterLock
 
class  Concurrency::details::_ReaderWriterLock::_Scoped_lock
 
class  Concurrency::details::_ReaderWriterLock::_Scoped_lock_read
 
class  Concurrency::details::_MallocaArrayHolder< _ElemType >
 
class  Concurrency::details::_MallocaListHolder< _ElemType >
 
class  Concurrency::details::_MallocaListHolder< _ElemType >::_ElemNodeType
 
class  Concurrency::scheduler_resource_allocation_error
 This class describes an exception thrown because of a failure to acquire a critical resource in the Concurrency Runtime. More...
 
class  Concurrency::scheduler_worker_creation_error
 This class describes an exception thrown because of a failure to create a worker execution context in the Concurrency Runtime. More...
 
class  Concurrency::unsupported_os
 This class describes an exception thrown when an unsupported operating system is used. More...
 
class  Concurrency::scheduler_not_attached
 This class describes an exception thrown when an operation is performed which requires a scheduler to be attached to the current context and one is not. More...
 
class  Concurrency::improper_scheduler_attach
 This class describes an exception thrown when the Attach method is called on a Scheduler object which is already attached to the current context. More...
 
class  Concurrency::improper_scheduler_detach
 This class describes an exception thrown when the CurrentScheduler::Detach method is called on a context which has not been attached to any scheduler using the Attach method of a Scheduler object. More...
 
class  Concurrency::improper_scheduler_reference
 This class describes an exception thrown when the Reference method is called on a Scheduler object that is shutting down, from a context that is not part of that scheduler. More...
 
class  Concurrency::default_scheduler_exists
 This class describes an exception thrown when the Scheduler::SetDefaultSchedulerPolicy method is called when a default scheduler already exists within the process. More...
 
class  Concurrency::context_unblock_unbalanced
 This class describes an exception thrown when calls to the Block and Unblock methods of a Context object are not properly paired. More...
 
class  Concurrency::context_self_unblock
 This class describes an exception thrown when the Unblock method of a Context object is called from the same context. This would indicate an attempt by a given context to unblock itself. More...
 
class  Concurrency::missing_wait
 This class describes an exception thrown when there are tasks still scheduled to a task_group or structured_task_group object at the time that object's destructor executes. This exception will never be thrown if the destructor is reached because of a stack unwinding as the result of an exception. More...
 
class  Concurrency::bad_target
 This class describes an exception thrown when a messaging block is given a pointer to a target which is invalid for the operation being performed. More...
 
class  Concurrency::message_not_found
 This class describes an exception thrown when a messaging block is unable to find a requested message. More...
 
class  Concurrency::invalid_link_target
 This class describes an exception thrown when the link_target method of a messaging block is called and the messaging block is unable to link to the target. This can be the result of exceeding the number of links the messaging block is allowed or attempting to link a specific target twice to the same source. More...
 
class  Concurrency::invalid_scheduler_policy_key
 This class describes an exception thrown when an invalid or unknown key is passed to a SchedulerPolicy object constructor, or the SetPolicyValue method of a SchedulerPolicy object is passed a key that must be changed using other means such as the SetConcurrencyLimits method. More...
 
class  Concurrency::invalid_scheduler_policy_value
 This class describes an exception thrown when a policy key of a SchedulerPolicy object is set to an invalid value for that key. More...
 
class  Concurrency::invalid_scheduler_policy_thread_specification
 This class describes an exception thrown when an attempt is made to set the concurrency limits of a SchedulerPolicy object such that the value of the MinConcurrency key is less than the value of the MaxConcurrency key. More...
 
class  Concurrency::invalid_operation
 This class describes an exception thrown when an invalid operation is performed that is not more accurately described by another exception type thrown by the Concurrency Runtime. More...
 
class  Concurrency::nested_scheduler_missing_detach
 This class describes an exception thrown when the Concurrency Runtime detects that you neglected to call the CurrentScheduler::Detach method on a context that attached to a second scheduler using the Attach method of the Scheduler object. More...
 
class  Concurrency::operation_timed_out
 This class describes an exception thrown when an operation has timed out. More...
 
class  Concurrency::invalid_multiple_scheduling
 This class describes an exception thrown when a task_handle object is scheduled multiple times using the run method of a task_group or structured_task_group object without an intervening call to either the wait or run_and_wait methods. More...
 
class  Concurrency::invalid_oversubscribe_operation
 This class describes an exception thrown when the Context::Oversubscribe method is called with the _BeginOversubscription parameter set to false without a prior call to the Context::Oversubscribe method with the _BeginOversubscription parameter set to true. More...
 
class  Concurrency::improper_lock
 This class describes an exception thrown when a lock is acquired improperly. More...
 
class  Concurrency::task_canceled
 This class describes an exception thrown by the PPL tasks layer in order to force the current task to cancel. It is also thrown by the get() method on task, for a canceled task. More...
 
class  Concurrency::location
 An abstraction of a physical location on hardware. More...
 
class  Concurrency::critical_section
 A non-reentrant mutex which is explicitly aware of the Concurrency Runtime. More...
 
class  Concurrency::critical_section::scoped_lock
 An exception safe RAII wrapper for a critical_section object. More...
 
class  Concurrency::reader_writer_lock
 A writer-preference queue-based reader-writer lock with local only spinning. The lock grants first in - first out (FIFO) access to writers and starves readers under a continuous load of writers. More...
 
class  Concurrency::reader_writer_lock::scoped_lock
 An exception safe RAII wrapper that can be used to acquire reader_writer_lock lock objects as a writer. More...
 
class  Concurrency::reader_writer_lock::scoped_lock_read
 An exception safe RAII wrapper that can be used to acquire reader_writer_lock lock objects as a reader. More...
 
class  Concurrency::event
 A manual reset event which is explicitly aware of the Concurrency Runtime. More...
 
class  Concurrency::details::_Condition_variable
 A _Condition_variable which is explicitly aware of the Concurrency Runtime. More...
 
class  Concurrency::details::_RefCounterBase
 
class  Concurrency::details::_NonReentrantPPLLock
 
class  Concurrency::details::_NonReentrantPPLLock::_Scoped_lock
 
class  Concurrency::details::_ReentrantPPLLock
 
class  Concurrency::details::_ReentrantPPLLock::_Scoped_lock
 
struct  Concurrency::details::_Chore
 
class  Concurrency::details::_UnrealizedChore
 
class  Concurrency::details::_TaskCollectionBase
 
class  Concurrency::details::_StructuredTaskCollection
 Structured task collections represent groups of work which follow a strictly LIFO ordered paradigm queueing and waiting respectively. They can only be waited on once and can only be used from a single thread of execution. More...
 
class  Concurrency::details::_TaskCollection
 Task collections represent groups of work which step outside the strict structuring of the _StructuredTaskCollection definition. Any groups of work which do not follow LIFO ordering, are waited on multiple times, or are passed between arbitrary threads require utilization of this definition of a task collection. It has additional overhead over the _StructuredTaskCollection. More...
 
class  Concurrency::details::_StackGuard
 RAII wrapper used to maintain and limit ppltask maximum inline schedule depth. This class will keep a reference to the depth slot on current context. More...
 
class  Concurrency::details::_AsyncTaskCollection
 Async Task collections is a thin wrapper over task collection to cater to the execution of asynchronous chores (or tasks defined in ppltasks.h). Specifically, they manage their own lifetime by using reference counts. Scheduling a chore acquires a reference and on completion of its execution the reference is released. More...
 
struct  Concurrency::details::_Beacon_reference
 Internal maintainence structure for beacons. More...
 
class  Concurrency::details::_Cancellation_beacon
 A cancellation beacon is a flag which can be polled in an inlinable fashion using the is_signaled method in lieu of polling on the more expensive non inlinable is_current_task_group_canceling method. More...
 
class  Concurrency::details::_Timer
 
struct  Concurrency::details::_CONCRT_TRACE_INFO
 

Namespaces

 Concurrency
 The Concurrency namespace provides classes and functions that provide access to the Concurrency Runtime, a concurrent programming framework for C++. For more information, see Concurrency Runtime.
 
 Concurrency::details
 

Macros

#define _CONCRT_H
 
#define _HRESULT_DEFINED
 
#define _InterlockedIncrementSizeT(_Target)   static_cast<size_t>(_InterlockedIncrement64(reinterpret_cast<__int64 volatile *>(_Target)))
 
#define _InterlockedDecrementSizeT(_Target)   static_cast<size_t>(_InterlockedDecrement64(reinterpret_cast<__int64 volatile *>(_Target)))
 
#define _InterlockedCompareExchangeSizeT(_Target, _Exchange, _Comparand)
 
#define _CONCRT_ASSERT(x)   __assume(x)
 
#define _LISTENTRY_SIZE   ((2 * sizeof(void *) + sizeof(_CONCRT_BUFFER) - 1) / sizeof(_CONCRT_BUFFER))
 
#define _SAFERWLIST_SIZE   ((3 * sizeof(void *) + 2 * sizeof(long) + sizeof(_CONCRT_BUFFER) - 1) / sizeof(_CONCRT_BUFFER))
 

Typedefs

typedef _SECURITY_ATTRIBUTES * LPSECURITY_ATTRIBUTES
 
typedef _GROUP_AFFINITY * PGROUP_AFFINITY
 
typedef unsigned long DWORD
 
typedef voidHANDLE
 
typedef unsigned __int64 DWORD_PTR
 
typedef unsigned __int64 * PDWORD_PTR
 
typedef void_CONCRT_BUFFER
 
typedef void(__cdecl * Concurrency::TaskProc) (void *)
 Concurrency::details contains definitions of support routines in the public namespaces and one or more macros. Users should not directly interact with this internal namespace. More...
 
typedef _SpinWait Concurrency::details::_SpinWaitBackoffNone
 
typedef _SpinWait< 0 > Concurrency::details::_SpinWaitNoYield
 
typedef void(__cdecl * Concurrency::details::_UnobservedExceptionHandler) (void)
 

Enumerations

enum  Concurrency::details::_TaskCollectionStatus { Concurrency::details::_NotComplete, Concurrency::details::_Completed, Concurrency::details::_Canceled }
 
enum  Concurrency::details::_TaskInliningMode { Concurrency::details::_NoInline = 0, Concurrency::details::_DefaultAutoInline = 16, Concurrency::details::_ForceInline = -1 }
 The enum defines inlining scheduling policy for ppltasks. Scheduling a chore or a functor with _TaskInliningMode will give scheduler a hint on whether apply inline execution or not. More...
 
enum  Concurrency::ConcRT_EventType {
  Concurrency::CONCRT_EVENT_GENERIC = 0, Concurrency::CONCRT_EVENT_START = 1, Concurrency::CONCRT_EVENT_END = 2, Concurrency::CONCRT_EVENT_BLOCK = 3,
  Concurrency::CONCRT_EVENT_UNBLOCK = 4, Concurrency::CONCRT_EVENT_YIELD = 5, Concurrency::CONCRT_EVENT_IDLE = 6, Concurrency::CONCRT_EVENT_ATTACH = 7,
  Concurrency::CONCRT_EVENT_DETACH = 8
}
 The types of events that can be traced using the tracing functionality offered by the Concurrency Runtime. More...
 
enum  Concurrency::Concrt_TraceFlags {
  Concurrency::SchedulerEventFlag = 0x1, Concurrency::ContextEventFlag = 0x2, Concurrency::VirtualProcessorEventFlag = 0x4, Concurrency::ResourceManagerEventFlag = 0x8,
  Concurrency::PPLEventFlag = 0x10, Concurrency::AgentEventFlag = 0x20, Concurrency::AllEventsFlag = 0xFFFFFFFF
}
 Trace flags for the event types More...
 
enum  Concurrency::Agents_EventType {
  Concurrency::AGENTS_EVENT_CREATE = 0, Concurrency::AGENTS_EVENT_START = 1, Concurrency::AGENTS_EVENT_END = 2, Concurrency::AGENTS_EVENT_DESTROY = 3,
  Concurrency::AGENTS_EVENT_SCHEDULE = 4, Concurrency::AGENTS_EVENT_LINK = 5, Concurrency::AGENTS_EVENT_UNLINK = 6, Concurrency::AGENTS_EVENT_NAME = 7
}
 The types of events that can be traced using the tracing functionality offered by the Agents Library More...
 

Functions

typedef __success (return >=0) long HRESULT
 
void _YieldProcessor ()
 
_CRTIMP void __cdecl Concurrency::wait (unsigned int _Milliseconds)
 Pauses the current context for a specified amount of time. More...
 
_CRTIMP void *__cdecl Concurrency::Alloc (size_t _NumBytes)
 Allocates a block of memory of the size specified from the Concurrency Runtime Caching Suballocator. More...
 
_CRTIMP void __cdecl Concurrency::Free (_Pre_maybenull_ _Post_invalid_ void *_PAllocation)
 Releases a block of memory previously allocated by the Alloc method to the Concurrency Runtime Caching Suballocator. More...
 
template<class _T >
void Concurrency::details::_InternalDeleteHelper (_T *_PObject)
 
void _CRTIMP __cdecl Concurrency::details::_UnderlyingYield ()
 Default method for yielding during a spin wait More...
 
unsigned int _CRTIMP __cdecl Concurrency::details::_GetConcurrency ()
 Returns the hardware concurrency available to the Concurrency Runtime, taking into account process affinity, or any restrictions in place because of the set_task_execution_resources method. More...
 
_CRTIMP void __cdecl Concurrency::details::_SetUnobservedExceptionHandler (_UnobservedExceptionHandler)
 
_CRTIMP void __cdecl Concurrency::details::_ReportUnobservedException ()
 
_CRTIMP const _CONCRT_TRACE_INFO * Concurrency::details::_GetConcRTTraceInfo ()
 Retrieves a pointer to the internal trace flags and level information for the Concurrency runtime ETW provider. More...
 
void Concurrency::details::_RegisterConcRTEventTracing ()
 Register ConcRT as an ETW Event Provider. More...
 
void Concurrency::details::_UnregisterConcRTEventTracing ()
 Unregister ConcRT as an ETW Event Provider. More...
 
 Concurrency::__declspec (deprecated("Concurrency::EnableTracing is a deprecated function.")) _CRTIMP HRESULT __cdecl EnableTracing()
 Enables tracing in the Concurrency Runtime. This function is deprecated because ETW tracing is now on by default. More...
 
 Concurrency::__declspec (deprecated("Concurrency::DisableTracing is a deprecated function.")) _CRTIMP HRESULT __cdecl DisableTracing()
 Disables tracing in the Concurrency Runtime. This function is deprecated because ETW tracing is unregistered by default. More...
 
const Concurrency::__declspec (selectany) GUID ConcRT_ProviderGuid = { 0x72B14A7D, 0x704C, 0x423e, { 0x92, 0xF8, 0x7E, 0x6D, 0x64, 0xBC, 0xB9, 0x2A } }
 The ETW provider GUID for the Concurrency Runtime. More...
 
_CRTIMP void __cdecl Concurrency::_Trace_ppl_function (const GUID &_Guid, unsigned char _Level, ConcRT_EventType _Type)
 
_CRTIMP void __cdecl Concurrency::_Trace_agents (Agents_EventType _Type, __int64 agentId,...)
 

Variables

const size_t Concurrency::COOPERATIVE_WAIT_TIMEOUT = SIZE_MAX
 Value indicating that a wait timed out. More...
 
const unsigned int Concurrency::COOPERATIVE_TIMEOUT_INFINITE = (unsigned int)-1
 Value indicating that a wait should never time out. More...
 

Macro Definition Documentation

#define _CONCRT_ASSERT (   x)    __assume(x)
#define _CONCRT_H
#define _HRESULT_DEFINED
#define _InterlockedCompareExchangeSizeT (   _Target,
  _Exchange,
  _Comparand 
)
Value:
static_cast<size_t>(_InterlockedCompareExchange64( \
reinterpret_cast<__int64 volatile *>(_Target), \
static_cast<__int64>(_Exchange), \
static_cast<__int64>(_Comparand)))
#define _InterlockedDecrementSizeT (   _Target)    static_cast<size_t>(_InterlockedDecrement64(reinterpret_cast<__int64 volatile *>(_Target)))
#define _InterlockedIncrementSizeT (   _Target)    static_cast<size_t>(_InterlockedIncrement64(reinterpret_cast<__int64 volatile *>(_Target)))
#define _LISTENTRY_SIZE   ((2 * sizeof(void *) + sizeof(_CONCRT_BUFFER) - 1) / sizeof(_CONCRT_BUFFER))
#define _SAFERWLIST_SIZE   ((3 * sizeof(void *) + 2 * sizeof(long) + sizeof(_CONCRT_BUFFER) - 1) / sizeof(_CONCRT_BUFFER))

Typedef Documentation

typedef void* _CONCRT_BUFFER
typedef unsigned long DWORD
typedef unsigned __int64 DWORD_PTR
typedef void* HANDLE
typedef _SECURITY_ATTRIBUTES* LPSECURITY_ATTRIBUTES
typedef unsigned __int64 * PDWORD_PTR
typedef _GROUP_AFFINITY* PGROUP_AFFINITY

Function Documentation

typedef __success ( return >=  0)
void _YieldProcessor ( )
inline
76 {}