BioDynaMo  v1.03.58-27764645
Public Member Functions | Private Attributes | List of all members
bdm::Spinlock Class Reference

#include <spinlock.h>

Public Member Functions

 Spinlock ()=default
 
 Spinlock (const Spinlock &other)
 
void lock ()
 
void unlock ()
 

Private Attributes

std::atomic_flag flag_ = ATOMIC_FLAG_INIT
 

Detailed Description

Definition at line 22 of file spinlock.h.

Constructor & Destructor Documentation

◆ Spinlock() [1/2]

bdm::Spinlock::Spinlock ( )
default

◆ Spinlock() [2/2]

bdm::Spinlock::Spinlock ( const Spinlock other)
inline

Used to store mutexes in a std::vector. Always creates a new mutex (even for the copy constructor)

Definition at line 28 of file spinlock.h.

Member Function Documentation

◆ lock()

void bdm::Spinlock::lock ( )
inline

Definition at line 30 of file spinlock.h.

◆ unlock()

void bdm::Spinlock::unlock ( )
inline

Definition at line 37 of file spinlock.h.

Member Data Documentation

◆ flag_

std::atomic_flag bdm::Spinlock::flag_ = ATOMIC_FLAG_INIT
private

Definition at line 42 of file spinlock.h.


The documentation for this class was generated from the following file: