| ISIX-RTOS - small operating system for ARM microcontrollers 1.2 | 
Semaphore C++ class wrapper. More...
#include <semaphore.h>

| Public Member Functions | |
| semaphore (int val, int limit_val=ISIX_SEM_ULIMITED) | |
| ~semaphore () | |
| Destruct semaphore object. | |
| bool | is_valid () | 
| int | wait (tick_t timeout) | 
| int | get_isr () | 
| int | signal () | 
| int | signal_isr () | 
| int | setval (int val) | 
| int | getval () | 
| Private Member Functions | |
| semaphore (const semaphore &) | |
| semaphore & | operator= (const semaphore &) | 
| Private Attributes | |
| sem_t * | sem | 
| Friends | |
| union | ihandle | 
Semaphore C++ class wrapper.
Definition at line 153 of file isix/semaphore.h.
| isix::semaphore::semaphore | ( | int | val, | 
| int | limit_val = ISIX_SEM_ULIMITED | ||
| ) |  [inline, explicit] | 
Construct semaphore object
| [in] | val | Initial value of the semaphore | 
Definition at line 162 of file isix/semaphore.h.
References isix::isix_sem_create_limited(), NULL, and sem.
| isix::semaphore::~semaphore | ( | ) |  [inline] | 
Destruct semaphore object.
Definition at line 167 of file isix/semaphore.h.
References isix::isix_sem_destroy(), and sem.
| isix::semaphore::semaphore | ( | const semaphore & | ) |  [private] | 
| int isix::semaphore::get_isr | ( | ) |  [inline] | 
Get the semaphore from the ISR context
Definition at line 185 of file isix/semaphore.h.
References isix::isix_sem_get_isr(), and sem.
| int isix::semaphore::getval | ( | ) |  [inline] | 
Get the semaphore value
Definition at line 214 of file isix/semaphore.h.
References isix::isix_sem_getval(), and sem.
| bool isix::semaphore::is_valid | ( | ) |  [inline] | 
Check the fifo object is in valid state
Definition at line 174 of file isix/semaphore.h.
References sem.
| int isix::semaphore::setval | ( | int | val | ) |  [inline] | 
Set value of the semaphore
| [in] | val | Value of the semaphore | 
Definition at line 207 of file isix/semaphore.h.
References isix::isix_sem_setval(), and sem.
| int isix::semaphore::signal | ( | ) |  [inline] | 
Signaling the semaphore
Definition at line 192 of file isix/semaphore.h.
References isix::isix_sem_signal(), and sem.
| int isix::semaphore::signal_isr | ( | ) |  [inline] | 
Signal the semaphore from the ISR context
Definition at line 199 of file isix/semaphore.h.
References isix::isix_sem_signal_isr(), and sem.
| int isix::semaphore::wait | ( | tick_t | timeout | ) |  [inline] | 
Wait for the semaphore for selected time
| [in] | timeout | Max waiting time | 
Definition at line 178 of file isix/semaphore.h.
References isix::isix_sem_wait(), and sem.
| friend union ihandle  [friend] | 
Definition at line 156 of file isix/semaphore.h.
| sem_t* isix::semaphore::sem  [private] | 
Definition at line 222 of file isix/semaphore.h.
Referenced by get_isr(), getval(), is_valid(), semaphore(), setval(), signal(), signal_isr(), wait(), and ~semaphore().
 1.7.3
 1.7.3