SDRAngel  4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
Public Member Functions | Protected Attributes | List of all members
Spinlock Class Reference

#include <spinlock.h>

Public Member Functions

void lock ()
 
void unlock ()
 

Protected Attributes

QAtomicInt m_atomic
 

Detailed Description

Definition at line 8 of file spinlock.h.

Member Function Documentation

◆ lock()

void Spinlock::lock ( )
inline

Definition at line 10 of file spinlock.h.

11  {
12  while(!m_atomic.testAndSetAcquire(0, 1)) ;
13  }
QAtomicInt m_atomic
Definition: spinlock.h:21

◆ unlock()

void Spinlock::unlock ( )
inline

Definition at line 15 of file spinlock.h.

16  {
17  while(!m_atomic.testAndSetRelease(1, 0)) ;
18  }
QAtomicInt m_atomic
Definition: spinlock.h:21

Member Data Documentation

◆ m_atomic

QAtomicInt Spinlock::m_atomic
protected

Definition at line 21 of file spinlock.h.


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