mutex.h File Reference


Detailed Description

OS independant class for the mutex management with Windows and Posix implementation Classes CMutex, CSynchronized

Id
mutex.h,v 1.27 2004/01/08 15:13:03 lecroart Exp

Definition in file mutex.h.

#include "nel/misc/types_nl.h"
#include "nel/misc/time_nl.h"
#include <map>

Go to the source code of this file.

Namespaces

namespace  NLMISC

Defines

#define ASM_ASWAP_FOR_GCC_CMPXCHG
#define ASM_ASWAP_FOR_GCC_XCHG
#define CMutex   CFairMutex
#define CSynchronized   CFairSynchronized
#define STORE_MUTEX_NAME


Define Documentation

#define ASM_ASWAP_FOR_GCC_CMPXCHG
 

Value:

__asm__ volatile( \
                    "mov $1, %%edx;" \
                    "mov %1, %%ecx;" \
                    "mov (%%ecx), %%eax;" \
                    "1:nop;" \
                    "lock cmpxchgl %%edx, (%%ecx);" \
                    "jne 1b;" \
                    "mov %%eax, %0" \
                : "=m" (result) \
                    : "m" (lockPtr) \
                    : "eax", "ecx", "edx", "memory" );

Definition at line 138 of file mutex.h.

#define ASM_ASWAP_FOR_GCC_XCHG
 

Value:

__asm__ volatile( \
                    "mov %1, %%ecx;" \
                    "mov $1, %%eax;" \
                    "xchg %%eax, (%%ecx);" \
                    "mov %%eax, %0" \
                : "=m" (result) \
                    : "m" (lockPtr) \
                    : "eax", "ecx", "memory" );

Definition at line 127 of file mutex.h.

Referenced by NLMISC::CFastMutex::atomic_swap().

#define CMutex   CFairMutex
 

Definition at line 57 of file mutex.h.

Referenced by NLMISC::IDisplayer::IDisplayer().

#define CSynchronized   CFairSynchronized
 

Definition at line 563 of file mutex.h.

#define STORE_MUTEX_NAME
 

Definition at line 53 of file mutex.h.


Generated on Tue Mar 16 06:43:10 2004 for NeL by doxygen 1.3.6