Pico-Arduino
Public Member Functions | Protected Attributes | List of all members
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
 
int available ()
 checks if a semaphore is available
 
void reset (int permits=1)
 calls sem_reset
 
bool aquire (int64_t timeoutMs=-1)
 aquires a semaphore - if no time is indicated it is blocking
 
bool release ()
 release the semaphore and makes it availale for other processes
 
bool up ()
 identical with aquire
 
bool down ()
 identical with release
 
bool wait ()
 identical with aquire
 
bool signal ()
 identical with release
 

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: