tlds
Transactional Operations for Linked Data Structures
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
intel_defns.h File Reference
#include <pthread.h>
#include <sched.h>
Include dependency graph for intel_defns.h:

Go to the source code of this file.

Macros

#define INTEL
 
#define CAS(_a, _o, _n)
 
#define FAS(_a, _n)
 
#define CAS64(_a, _o, _n)
 
#define CASIO   CAS
 
#define FASIO   FAS
 
#define CASPO   CAS
 
#define FASPO   FAS
 
#define CAS32O   CAS
 
#define CAS64O   CAS64
 
#define MB()   __sync_synchronize()
 
#define WMB()   __asm__ __volatile__ ("" : : : "memory")
 
#define RMB()   MB()
 
#define VOLATILE   /*volatile*/
 
#define RMB_NEAR_CAS()   WMB()
 
#define WMB_NEAR_CAS()   WMB()
 
#define MB_NEAR_CAS()   WMB()
 

Typedefs

typedef unsigned long long tick_t
 
typedef unsigned char _u8
 
typedef unsigned short _u16
 
typedef unsigned int _u32
 
typedef unsigned long long _u64
 

Functions

static tick_t __attribute__ ((always_inline)) RDTICK()
 

Macro Definition Documentation

#define CAS (   _a,
  _o,
  _n 
)
Value:
({ __typeof__(_o) __o = _o; \
__asm__ __volatile__( \
"lock cmpxchg %3,%1" \
: "=a" (__o), "=m" (*(volatile unsigned int *)(_a)) \
: "0" (__o), "r" (_n) ); \
__o; \
})
#define CAS32O   CAS
#define CAS64 (   _a,
  _o,
  _n 
)
Value:
({ __typeof__(_o) __o = _o; \
__asm__ __volatile__( \
"movl %3, %%ecx;" \
"movl %4, %%ebx;" \
"lock cmpxchg8b %1" \
: "=A" (__o), "=m" (*(volatile unsigned long long *)(_a)) \
: "0" (__o), "m" (_n >> 32), "m" (_n) \
: "ebx", "ecx" ); \
__o; \
})
#define CAS64O   CAS64
#define CASIO   CAS
#define CASPO   CAS
#define FAS (   _a,
  _n 
)
Value:
({ __typeof__(_n) __o; \
__asm__ __volatile__( \
"lock xchg %0,%1" \
: "=r" (__o), "=m" (*(volatile unsigned int *)(_a)) \
: "0" (_n) ); \
__o; \
})
#define FASIO   FAS
#define FASPO   FAS
#define INTEL
#define MB ( )    __sync_synchronize()
#define MB_NEAR_CAS ( )    WMB()
#define RMB ( )    MB()
#define RMB_NEAR_CAS ( )    WMB()
#define VOLATILE   /*volatile*/
#define WMB ( )    __asm__ __volatile__ ("" : : : "memory")
#define WMB_NEAR_CAS ( )    WMB()

Typedef Documentation

typedef unsigned short _u16
typedef unsigned int _u32
typedef unsigned long long _u64
typedef unsigned char _u8
typedef unsigned long long tick_t

Function Documentation

static tick_t __attribute__ ( (always_inline)  )
inlinestatic