Pico-Arduino
|
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 |
Pico Semaphore which might be useful if you use the 2 processors (e.g. with the Thread class)