Electronics and Software
Engineering Innovation
Beam-lib  2.15.1

Resource lock. More...

#include <BCondInt.h>

Public Member Functions

 BCondResource ()
 
 ~BCondResource ()
 
int lock (uint32_t timeOutUs=0)
 Lock the resource, will wait for all usage to be 0. More...
 
int unlock ()
 Unlock the resource. More...
 
int start (uint32_t timeOutUs=0)
 Start using the resource. More...
 
int end ()
 Finish using the resource. More...
 
int locked ()
 
int inUse ()
 

Private Attributes

pthread_mutex_t omutex
 
pthread_cond_t ocond
 
int olock
 
int ouse
 

Detailed Description

Resource lock.

Constructor & Destructor Documentation

◆ BCondResource()

BCondResource::BCondResource ( )

◆ ~BCondResource()

BCondResource::~BCondResource ( )

Member Function Documentation

◆ end()

int BCondResource::end ( )

Finish using the resource.

◆ inUse()

int BCondResource::inUse ( )

◆ lock()

int BCondResource::lock ( uint32_t  timeOutUs = 0)

Lock the resource, will wait for all usage to be 0.

◆ locked()

int BCondResource::locked ( )

◆ start()

int BCondResource::start ( uint32_t  timeOutUs = 0)

Start using the resource.

◆ unlock()

int BCondResource::unlock ( )

Unlock the resource.

Member Data Documentation

◆ ocond

pthread_cond_t BCondResource::ocond
private

◆ olock

int BCondResource::olock
private

◆ omutex

pthread_mutex_t BCondResource::omutex
private

◆ ouse

int BCondResource::ouse
private

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