PAPI  5.3.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
darwin-lock.h File Reference
Include dependency graph for darwin-lock.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MUTEX_OPEN   0
 
#define MUTEX_CLOSED   1
 
#define _papi_hwd_lock(lck)
 
#define _papi_hwd_unlock(lck)
 

Variables

volatile unsigned int _papi_hwd_lock_data [PAPI_MAX_LOCK]
 

Macro Definition Documentation

#define _papi_hwd_lock (   lck)
Value:
do \
{ \
unsigned int res = 0; \
do { \
__asm__ __volatile__ ("lock ; " "cmpxchg %1,%2" : "=a"(res) : "q"(MUTEX_CLOSED), "m"(_papi_hwd_lock_data[lck]), "0"(MUTEX_OPEN) : "memory"); \
} while(res != (unsigned int)MUTEX_OPEN); \
} while(0)
volatile unsigned int _papi_hwd_lock_data[PAPI_MAX_LOCK]
Definition: darwin-common.c:32
#define MUTEX_CLOSED
Definition: darwin-lock.h:30
#define MUTEX_OPEN
Definition: darwin-lock.h:29

Definition at line 32 of file darwin-lock.h.

#define _papi_hwd_unlock (   lck)
Value:
do \
{ \
unsigned int res = 0; \
__asm__ __volatile__ ("xchg %0,%1" : "=r"(res) : "m"(_papi_hwd_lock_data[lck]), "0"(MUTEX_OPEN) : "memory"); \
} while(0)
volatile unsigned int _papi_hwd_lock_data[PAPI_MAX_LOCK]
Definition: darwin-common.c:32
#define MUTEX_OPEN
Definition: darwin-lock.h:29

Definition at line 40 of file darwin-lock.h.

#define MUTEX_CLOSED   1

Definition at line 30 of file darwin-lock.h.

#define MUTEX_OPEN   0

Definition at line 29 of file darwin-lock.h.

Variable Documentation

volatile unsigned int _papi_hwd_lock_data[PAPI_MAX_LOCK]

Definition at line 32 of file darwin-common.c.