Pico-Arduino
Public Member Functions | Protected Attributes | List of all members
pico_arduino::Semaphore Class Reference

Pico Semaphore which might be useful if you use the 2 processors (e.g. with the Thread class) More...

#include <PicoSemaphore.h>

Public Member Functions

 Semaphore (int maxPermits=1, int initalPermits=1)
 constructor - calls sem_init
 
 ~Semaphore ()
 descructor - calls sem_release
 
bool aquire (int64_t timeoutMs=-1)
 aquires a semaphore - if no time is indicated it is blocking
 
int available ()
 checks if a semaphore is available
 
bool down ()
 identical with release
 
bool release ()
 release the semaphore and makes it availale for other processes
 
void reset (int permits=1)
 calls sem_reset
 
bool signal ()
 identical with release
 
bool up ()
 identical with aquire
 
bool wait ()
 identical with aquire
 

Protected Attributes

semaphore_t sem
 

Detailed Description

Pico Semaphore which might be useful if you use the 2 processors (e.g. with the Thread class)

Author
Phil Schatzmann

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