alternative Standard Libary  0.29.8
std::spinlock Klassenreferenz

#include <spinlock.hpp>

+ Klassendiagramm für std::spinlock:
+ Zusammengehörigkeiten von std::spinlock:

Öffentliche Typen

using native_handle_type = Sys::spinlk_type *
 

Öffentliche Methoden

 spinlock ()
 
virtual ~spinlock ()
 
void lock (void)
 abstract function lock the current context Mehr ...
 
bool try_lock (void)
 abstract function try to lock the current context Mehr ...
 
void unlock (void)
 abstract function unlock the current locked context Mehr ...
 
native_handle_type native_handle ()
 
 spinlock (const spinlock &)=delete
 
spinlockoperator= (const spinlock &)=delete
 

Ausführliche Beschreibung

Dokumentation der benutzerdefinierten Datentypen

◆ native_handle_type

Beschreibung der Konstruktoren und Destruktoren

◆ spinlock() [1/2]

std::spinlock::spinlock ( )
30  {
31  Sys::spinlockInit(_m_locked, 0);
32  }
static int spinlockInit(spinlk_type *mutex, const void *attr)
Definition: PLATFORM.cpp:154

◆ ~spinlock()

std::spinlock::~spinlock ( )
virtual
34  {
35  unlock();
36  Sys::spinlockDestroy(_m_locked);
37  delete _m_locked;
38  }
void unlock(void)
abstract function unlock the current locked context
Definition: spinlock.cpp:43
static int spinlockDestroy(spinlk_type *mutex)
Definition: PLATFORM.cpp:157

◆ spinlock() [2/2]

std::spinlock::spinlock ( const spinlock )
delete

Dokumentation der Elementfunktionen

◆ lock()

void std::spinlock::lock ( void  )
virtual

abstract function lock the current context

Implementiert std::lock_base.

40  {
41  return Sys::spinlockLock(_m_locked);
42  }
static int spinlockLock(spinlk_type *mutex)
Definition: PLATFORM.cpp:160

◆ native_handle()

spinlock::native_handle_type std::spinlock::native_handle ( )
52  {
53  return _m_locked;
54  }

◆ operator=()

spinlock& std::spinlock::operator= ( const spinlock )
delete

◆ try_lock()

bool std::spinlock::try_lock ( void  )
virtual

abstract function try to lock the current context

Implementiert std::lock_base.

48  {
49  return Sys::spinlockTryLock(_m_locked) == 0;
50  }
static int spinlockTryLock(spinlk_type *mutex)
Definition: PLATFORM.cpp:166

◆ unlock()

void std::spinlock::unlock ( void  )
virtual

abstract function unlock the current locked context

Implementiert std::lock_base.

44  {
45  return Sys::spinlockUnLock( _m_locked );
46  }
static int spinlockUnLock(spinlk_type *mutex)
Definition: PLATFORM.cpp:163

Die Dokumentation für diese Klasse wurde erzeugt aufgrund der Dateien: