Intel(R) Threading Building Blocks Doxygen Documentation  version 4.2.3
msvc_ia32_common.h File Reference
#include <intrin.h>
Include dependency graph for msvc_ia32_common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tbb::internal::cpu_ctl_env
 

Namespaces

 tbb
 The graph class.
 
 tbb::internal
 Identifiers declared inside namespace internal should never be used directly by client code.
 
 tbb::internal::msvc_intrinsics
 
 tbb::internal::msvc_inline_asm
 

Macros

#define __TBB_X86_MSVC_INLINE_ASM_AVAILABLE   1
 
#define __TBB_r(reg_name)   e##reg_name
 
#define __TBB_W(name)   name
 
#define __TBB_compiler_fence()   __asm { __asm nop }
 
#define __TBB_full_memory_fence()   __asm { __asm mfence }
 
#define __TBB_control_consistency_helper()   __TBB_compiler_fence()
 
#define __TBB_acquire_consistency_helper()   __TBB_compiler_fence()
 
#define __TBB_release_consistency_helper()   __TBB_compiler_fence()
 
#define __TBB_Pause(V)   tbb::internal::msvc_inline_asm::pause(V)
 
#define __TBB_SINGLE_PAUSE   __asm pause
 
#define __TBB_Log2(V)   tbb::internal::msvc_inline_asm::lg_bsr(V)
 
#define __TBB_AtomicOR(P, V)   tbb::internal::msvc_inline_asm::lock_or(P,V)
 
#define __TBB_AtomicAND(P, V)   tbb::internal::msvc_inline_asm::lock_and(P,V)
 
#define __TBB_time_stamp()   __TBB_machine_time_stamp()
 
#define __TBB_CPU_CTL_ENV_PRESENT   1
 
#define __TBB_Yield()   SwitchToThread()
 

Typedefs

typedef long tbb::internal::msvc_intrinsics::word
 

Functions

namespace msvc_inline_asm static inline void tbb::internal::pause (uintptr_t delay)
 
static uintptr_t tbb::internal::msvc_inline_asm::lg_bsr (uintptr_t i)
 
static void tbb::internal::msvc_inline_asm::lock_or (volatile void *operand, __int32 addend)
 
static void tbb::internal::msvc_inline_asm::lock_and (volatile void *operand, __int32 addend)
 
static tbb::internal::machine_tsc_t __TBB_machine_time_stamp ()
 
void __TBB_get_cpu_ctl_env (tbb::internal::cpu_ctl_env *ctl)
 
void __TBB_set_cpu_ctl_env (const tbb::internal::cpu_ctl_env *ctl)
 
 __declspec (dllimport) int __stdcall SwitchToThread(void)
 
__int8 __TBB_EXPORTED_FUNC __TBB_machine_try_lock_elided (volatile void *ptr)
 
void __TBB_EXPORTED_FUNC __TBB_machine_unlock_elided (volatile void *ptr)
 
static void __TBB_machine_try_lock_elided_cancel ()
 
__int8 __TBB_EXPORTED_FUNC __TBB_machine_is_in_transaction ()
 
unsigned __int32 __TBB_EXPORTED_FUNC __TBB_machine_begin_transaction ()
 
void __TBB_EXPORTED_FUNC __TBB_machine_end_transaction ()
 
void __TBB_EXPORTED_FUNC __TBB_machine_transaction_conflict_abort ()
 

Macro Definition Documentation

◆ __TBB_acquire_consistency_helper

#define __TBB_acquire_consistency_helper ( )    __TBB_compiler_fence()

Definition at line 93 of file msvc_ia32_common.h.

◆ __TBB_AtomicAND

#define __TBB_AtomicAND (   P,
 
)    tbb::internal::msvc_inline_asm::lock_and(P,V)

Definition at line 193 of file msvc_ia32_common.h.

◆ __TBB_AtomicOR

#define __TBB_AtomicOR (   P,
 
)    tbb::internal::msvc_inline_asm::lock_or(P,V)

Definition at line 192 of file msvc_ia32_common.h.

◆ __TBB_compiler_fence

#define __TBB_compiler_fence ( )    __asm { __asm nop }

Definition at line 86 of file msvc_ia32_common.h.

◆ __TBB_control_consistency_helper

#define __TBB_control_consistency_helper ( )    __TBB_compiler_fence()

Definition at line 92 of file msvc_ia32_common.h.

◆ __TBB_CPU_CTL_ENV_PRESENT

#define __TBB_CPU_CTL_ENV_PRESENT   1

Definition at line 204 of file msvc_ia32_common.h.

◆ __TBB_full_memory_fence

#define __TBB_full_memory_fence ( )    __asm { __asm mfence }

Definition at line 87 of file msvc_ia32_common.h.

◆ __TBB_Log2

#define __TBB_Log2 (   V)    tbb::internal::msvc_inline_asm::lg_bsr(V)

Definition at line 154 of file msvc_ia32_common.h.

◆ __TBB_Pause

#define __TBB_Pause (   V)    tbb::internal::msvc_inline_asm::pause(V)

Definition at line 123 of file msvc_ia32_common.h.

◆ __TBB_r

#define __TBB_r (   reg_name)    e##reg_name

Definition at line 45 of file msvc_ia32_common.h.

◆ __TBB_release_consistency_helper

#define __TBB_release_consistency_helper ( )    __TBB_compiler_fence()

Definition at line 94 of file msvc_ia32_common.h.

◆ __TBB_SINGLE_PAUSE

#define __TBB_SINGLE_PAUSE   __asm pause

Definition at line 124 of file msvc_ia32_common.h.

◆ __TBB_time_stamp

#define __TBB_time_stamp ( )    __TBB_machine_time_stamp()

Definition at line 201 of file msvc_ia32_common.h.

◆ __TBB_W

#define __TBB_W (   name)    name

Definition at line 46 of file msvc_ia32_common.h.

◆ __TBB_X86_MSVC_INLINE_ASM_AVAILABLE

#define __TBB_X86_MSVC_INLINE_ASM_AVAILABLE   1

Definition at line 31 of file msvc_ia32_common.h.

◆ __TBB_Yield

#define __TBB_Yield ( )    SwitchToThread()

Definition at line 249 of file msvc_ia32_common.h.

Function Documentation

◆ __declspec()

__declspec ( dllimport  )

◆ __TBB_get_cpu_ctl_env()

void __TBB_get_cpu_ctl_env ( tbb::internal::cpu_ctl_env ctl)
inline

Definition at line 208 of file msvc_ia32_common.h.

208  {
209  __asm {
210  __asm mov __TBB_r(ax), ctl
211  __asm stmxcsr [__TBB_r(ax)]
212  __asm fstcw [__TBB_r(ax)+4]
213  }
214  }
#define __TBB_r(reg_name)

References __TBB_r.

Referenced by tbb::internal::cpu_ctl_env::get_env().

Here is the caller graph for this function:

◆ __TBB_machine_begin_transaction()

unsigned __int32 __TBB_EXPORTED_FUNC __TBB_machine_begin_transaction ( )

◆ __TBB_machine_end_transaction()

void __TBB_EXPORTED_FUNC __TBB_machine_end_transaction ( )

◆ __TBB_machine_is_in_transaction()

__int8 __TBB_EXPORTED_FUNC __TBB_machine_is_in_transaction ( )

◆ __TBB_machine_time_stamp()

static tbb::internal::machine_tsc_t __TBB_machine_time_stamp ( )
inlinestatic

Definition at line 198 of file msvc_ia32_common.h.

198  {
199  return __rdtsc();
200 }

◆ __TBB_machine_transaction_conflict_abort()

void __TBB_EXPORTED_FUNC __TBB_machine_transaction_conflict_abort ( )

◆ __TBB_machine_try_lock_elided()

__int8 __TBB_EXPORTED_FUNC __TBB_machine_try_lock_elided ( volatile void ptr)

◆ __TBB_machine_try_lock_elided_cancel()

static void __TBB_machine_try_lock_elided_cancel ( )
inlinestatic

Definition at line 264 of file msvc_ia32_common.h.

#define __TBB_SINGLE_PAUSE

References __TBB_SINGLE_PAUSE.

◆ __TBB_machine_unlock_elided()

void __TBB_EXPORTED_FUNC __TBB_machine_unlock_elided ( volatile void ptr)

◆ __TBB_set_cpu_ctl_env()

void __TBB_set_cpu_ctl_env ( const tbb::internal::cpu_ctl_env ctl)
inline

Definition at line 215 of file msvc_ia32_common.h.

215  {
216  __asm {
217  __asm mov __TBB_r(ax), ctl
218  __asm ldmxcsr [__TBB_r(ax)]
219  __asm fldcw [__TBB_r(ax)+4]
220  }
221  }
#define __TBB_r(reg_name)

References __TBB_r.

Referenced by tbb::internal::cpu_ctl_env::set_env().

Here is the caller graph for this function:

Copyright © 2005-2019 Intel Corporation. All Rights Reserved.

Intel, Pentium, Intel Xeon, Itanium, Intel XScale and VTune are registered trademarks or trademarks of Intel Corporation or its subsidiaries in the United States and other countries.

* Other names and brands may be claimed as the property of others.