#include <stdint.h>
#include <unistd.h>
Go to the source code of this file.
◆ __TBB_acquire_consistency_helper
◆ __TBB_AtomicAND
◆ __TBB_AtomicOR
◆ __TBB_compiler_fence
      
        
          | #define __TBB_compiler_fence | 
          ( | 
           | ) | 
             __asm__ __volatile__ ("": : :"memory") | 
        
      
 
To those working on SPARC hardware. Consider relaxing acquire and release consistency helpers to no-op (as this port covers TSO mode only). 
Definition at line 34 of file sunos_sparc.h.
 
 
◆ __TBB_control_consistency_helper
◆ __TBB_ENDIANNESS
◆ __TBB_full_memory_fence
      
        
          | #define __TBB_full_memory_fence | 
          ( | 
           | ) | 
             __asm__ __volatile__("membar #LoadLoad|#LoadStore|#StoreStore|#StoreLoad": : : "memory") | 
        
      
 
 
◆ __TBB_Log2
◆ __TBB_Pause
◆ __TBB_release_consistency_helper
◆ __TBB_TryLockByte
◆ __TBB_USE_GENERIC_FETCH_STORE
      
        
          | #define __TBB_USE_GENERIC_FETCH_STORE   1 | 
        
      
 
 
◆ __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE
      
        
          | #define __TBB_USE_GENERIC_HALF_FENCED_LOAD_STORE   1 | 
        
      
 
 
◆ __TBB_USE_GENERIC_PART_WORD_CAS
      
        
          | #define __TBB_USE_GENERIC_PART_WORD_CAS   1 | 
        
      
 
 
◆ __TBB_USE_GENERIC_PART_WORD_FETCH_ADD
      
        
          | #define __TBB_USE_GENERIC_PART_WORD_FETCH_ADD   1 | 
        
      
 
 
◆ __TBB_USE_GENERIC_RELAXED_LOAD_STORE
      
        
          | #define __TBB_USE_GENERIC_RELAXED_LOAD_STORE   1 | 
        
      
 
 
◆ __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE
      
        
          | #define __TBB_USE_GENERIC_SEQUENTIAL_CONSISTENCY_LOAD_STORE   1 | 
        
      
 
 
◆ __TBB_WORDSIZE
◆ __TBB_machine_and()
  
  
      
        
          | static void __TBB_machine_and  | 
          ( | 
          volatile void *  | 
          ptr,  | 
         
        
           | 
           | 
          uint64_t  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 155 of file sunos_sparc.h.
  156   __asm__ __volatile__ (
   157                         "0:\t and\t %2, %3, %%g1\n"            158                         "\t casx\t [%1], %2, %%g1\n"           159                         "\t cmp\t %2, %%g1\n"                  160                         "\t bne,a,pn\t %%xcc, 0b\n"            162                 : 
"=m"(*(int64_t *)ptr)
   163                 : 
"r"(ptr), 
"r"(*(int64_t *)ptr), 
"r"(
value), 
"m"(*(int64_t *)ptr)
   164                 : 
"ccr", 
"g1", 
"memory");
 void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
 
 
References value.
 
 
◆ __TBB_machine_cmpswp4()
  
  
      
        
          | static int32_t __TBB_machine_cmpswp4  | 
          ( | 
          volatile void *  | 
          ptr,  | 
         
        
           | 
           | 
          int32_t  | 
          value,  | 
         
        
           | 
           | 
          int32_t  | 
          comparand  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Atomic CAS for 32 bit values, if *ptr==comparand, then *ptr=value, returns *ptr 
- Parameters
 - 
  
    | ptr | pointer to value in memory to be swapped with value if *ptr==comparand  | 
    | value | value to assign *ptr to if *ptr==comparand  | 
    | comparand | value to compare with *ptr (  | 
  
   
- Returns
 - value originally in memory at ptr, regardless of success 
 
Definition at line 51 of file sunos_sparc.h.
   55                        : 
"=m"(*(int32_t *)ptr), 
"=r"(result)
    56                        : 
"m"(*(int32_t *)ptr), 
"1"(
value), 
"r"(comparand), 
"r"(ptr)
 void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
 
 
References value.
 
 
◆ __TBB_machine_cmpswp8()
  
  
      
        
          | static int64_t __TBB_machine_cmpswp8  | 
          ( | 
          volatile void *  | 
          ptr,  | 
         
        
           | 
           | 
          int64_t  | 
          value,  | 
         
        
           | 
           | 
          int64_t  | 
          comparand  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Atomic CAS for 64 bit values, if *ptr==comparand, then *ptr=value, returns *ptr 
- Parameters
 - 
  
    | ptr | pointer to value in memory to be swapped with value if *ptr==comparand  | 
    | value | value to assign *ptr to if *ptr==comparand  | 
    | comparand | value to compare with *ptr (  | 
  
   
- Returns
 - value originally in memory at ptr, regardless of success 
 
Definition at line 68 of file sunos_sparc.h.
   72                : 
"=m"(*(int64_t *)ptr), 
"=r"(result)
    73                : 
"m"(*(int64_t *)ptr), 
"1"(
value), 
"r"(comparand), 
"r"(ptr)
 void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
 
 
References value.
 
 
◆ __TBB_machine_fetchadd4()
  
  
      
        
          | static int32_t __TBB_machine_fetchadd4  | 
          ( | 
          volatile void *  | 
          ptr,  | 
         
        
           | 
           | 
          int32_t  | 
          addend  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Atomic fetch and add for 32 bit values, in this case implemented by continuously checking success of atomicity 
- Parameters
 - 
  
    | ptr | pointer to value to add addend to  | 
    | addened | value to add to *ptr  | 
  
   
- Returns
 - value at ptr before addened was added 
 
Definition at line 88 of file sunos_sparc.h.
   90   __asm__ __volatile__ (
    91                         "0:\t add\t %3, %4, %0\n"               92                         "\t cas\t [%2], %3, %0\n"               94                         "\t bne,a,pn\t %%icc, 0b\n"             96                : 
"=&r"(result), 
"=m"(*(int32_t *)ptr)
    97                : 
"r"(ptr), 
"r"(*(int32_t *)ptr), 
"r"(addend), 
"m"(*(int32_t *)ptr)
  
 
 
◆ __TBB_machine_fetchadd8()
  
  
      
        
          | static int64_t __TBB_machine_fetchadd8  | 
          ( | 
          volatile void *  | 
          ptr,  | 
         
        
           | 
           | 
          int64_t  | 
          addend  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Atomic fetch and add for 64 bit values, in this case implemented by continuously checking success of atomicity 
- Parameters
 - 
  
    | ptr | pointer to value to add addend to  | 
    | addened | value to add to *ptr  | 
  
   
- Returns
 - value at ptr before addened was added 
 
Definition at line 108 of file sunos_sparc.h.
  110   __asm__ __volatile__ (
   111                         "0:\t add\t %3, %4, %0\n"              112                         "\t casx\t [%2], %3, %0\n"             114                         "\t bne,a,pn\t %%xcc, 0b\n"            116                 : 
"=&r"(result), 
"=m"(*(int64_t *)ptr)
   117                 : 
"r"(ptr), 
"r"(*(int64_t *)ptr), 
"r"(addend), 
"m"(*(int64_t *)ptr)
  
 
 
◆ __TBB_machine_lg()
  
  
      
        
          | static int64_t __TBB_machine_lg  | 
          ( | 
          uint64_t  | 
          x | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 126 of file sunos_sparc.h.
  137     __asm__ (
"popc %1, %0" : 
"=r"(
count) : 
"r"(x) );
 #define __TBB_ASSERT(predicate, comment)
No-op version of __TBB_ASSERT.
 
void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t count
 
 
References __TBB_ASSERT, and count.
 
 
◆ __TBB_machine_or()
  
  
      
        
          | static void __TBB_machine_or  | 
          ( | 
          volatile void *  | 
          ptr,  | 
         
        
           | 
           | 
          uint64_t  | 
          value  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 143 of file sunos_sparc.h.
  144   __asm__ __volatile__ (
   145                         "0:\t or\t %2, %3, %%g1\n"             146                         "\t casx\t [%1], %2, %%g1\n"           147                         "\t cmp\t %2, %%g1\n"                  148                         "\t bne,a,pn\t %%xcc, 0b\n"            150                 : 
"=m"(*(int64_t *)ptr)
   151                 : 
"r"(ptr), 
"r"(*(int64_t *)ptr), 
"r"(
value), 
"m"(*(int64_t *)ptr)
   152                 : 
"ccr", 
"g1", 
"memory");
 void const char const char int ITT_FORMAT __itt_group_sync x void const char ITT_FORMAT __itt_group_sync s void ITT_FORMAT __itt_group_sync p void ITT_FORMAT p void ITT_FORMAT p no args __itt_suppress_mode_t unsigned int void size_t ITT_FORMAT d void ITT_FORMAT p void ITT_FORMAT p __itt_model_site __itt_model_site_instance ITT_FORMAT p __itt_model_task __itt_model_task_instance ITT_FORMAT p void ITT_FORMAT p void ITT_FORMAT p void size_t ITT_FORMAT d void ITT_FORMAT p const wchar_t ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s const char ITT_FORMAT s no args void ITT_FORMAT p size_t ITT_FORMAT d no args const wchar_t const wchar_t ITT_FORMAT s __itt_heap_function void size_t int ITT_FORMAT d __itt_heap_function void ITT_FORMAT p __itt_heap_function void void size_t int ITT_FORMAT d no args no args unsigned int ITT_FORMAT u const __itt_domain __itt_id ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain __itt_id ITT_FORMAT p const __itt_domain __itt_id __itt_timestamp __itt_timestamp ITT_FORMAT lu const __itt_domain __itt_id __itt_id __itt_string_handle ITT_FORMAT p const __itt_domain ITT_FORMAT p const __itt_domain __itt_string_handle unsigned long long value
 
 
References value.
 
 
◆ __TBB_machine_pause()
  
  
      
        
          | static void __TBB_machine_pause  | 
          ( | 
          int32_t  | 
          delay | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
 
◆ __TBB_machine_trylockbyte()
  
  
      
        
          | static bool __TBB_machine_trylockbyte  | 
          ( | 
          unsigned char &  | 
          flag | ) | 
           | 
         
       
   | 
  
inlinestatic   | 
  
 
Definition at line 175 of file sunos_sparc.h.
  176     unsigned char result;
   177     __asm__ __volatile__ (
   178             "ldstub\t [%2], %0\n"   179         : 
"=r"(result), 
"=m"(flag)
   180         : 
"r"(&flag), 
"m"(flag)