PxMutexT

Defined in include/foundation/PxMutex.h

Classes

template<typename Alloc = PxReflectionAllocator<PxMutexImpl>>
class PxMutexT : protected PxReflectionAllocator<PxMutexImpl>

Public Functions

inline PxMutexT(const Alloc &alloc = Alloc())

The constructor for Mutex creates a mutex.

It is initially unlocked.

inline ~PxMutexT()

The destructor for Mutex deletes the mutex.

inline void lock() const

Acquire (lock) the mutex.

If the mutex is already locked by another thread, this method blocks until the mutex is unlocked.

inline bool trylock() const

Acquire (lock) the mutex.

If the mutex is already locked by another thread, this method returns false without blocking, returns true if lock is successfully acquired

inline void unlock() const

Release (unlock) the mutex, the calling thread must have previously called lock() or method will error.

Protected Static Functions

static inline void *allocate(size_t size, const char *filename, int line, uint32_t *cookie = NULL)
static inline void deallocate(void *ptr, uint32_t *cookie = NULL)
class ScopedLock

Public Functions

inline ScopedLock(PxMutexT<Alloc> &mutex)
inline ~ScopedLock()