|
EE445M RTOS
Taken at the University of Texas Spring 2015
|
Classes | |
| class | semaphore |
Functions | |
| semaphore::semaphore () | |
| semaphore::semaphore (int16_t initial_value) | |
| void | semaphore::init (void) |
| void | semaphore::post (void) |
| void | semaphore::wait (void) |
| void | semaphore::take (void) |
| bool | semaphore::guard (void) |
| bool | semaphore::blocked (void) |
| void | semaphore::reset (void) |
Variables | |
| int16_t | semaphore::value |
| uint32_t | semaphore::total_posts |
| bool semaphore::blocked | ( | void | ) |
True if the semaphore is blocked.
Definition at line 68 of file semaphorepp.cpp.
References value.
Referenced by wait().

| bool semaphore::guard | ( | void | ) |
without the waiting – take if ready, leave if not.
Definition at line 57 of file semaphorepp.cpp.
References critical::EndCritical(), critical::StartCritical(), and value.
Referenced by can_handler(), motor_control(), ping_handler(), shell_handler(), switch_responder(), thread_blink_blue(), thread_blink_green(), and thread_blink_red().


| void semaphore::init | ( | void | ) |
Definition at line 21 of file semaphorepp.cpp.
References total_posts.
Referenced by semaphore().

| void semaphore::post | ( | void | ) |
Increment the semaphore.
Definition at line 45 of file semaphorepp.cpp.
References critical::EndCritical(), critical::StartCritical(), total_posts, and value.
Referenced by CAN0_Handler(), lswitch::end_debounce(), ping::handle_timer(), shell::motor_start(), shell::motor_stop(), buffer< int32_t, N >::notify(), and ping::start().


| void semaphore::reset | ( | void | ) |
Reset the semaphore.
Definition at line 28 of file semaphorepp.cpp.
References critical::EndCritical(), critical::StartCritical(), and value.
Referenced by semaphore(), and ping::stop().


| semaphore::semaphore | ( | ) |
Definition at line 7 of file semaphorepp.cpp.
References init(), and reset().

| semaphore::semaphore | ( | int16_t | initial_value | ) |
Definition at line 13 of file semaphorepp.cpp.
References critical::EndCritical(), init(), critical::StartCritical(), and value.

| void semaphore::take | ( | void | ) |
Take the semaphore
| void semaphore::wait | ( | void | ) |
Wait on a semaphore.
Definition at line 35 of file semaphorepp.cpp.
References blocked(), critical::EndCritical(), critical::StartCritical(), and value.

|
private |
Definition at line 21 of file semaphorepp.hpp.
|
private |
Definition at line 19 of file semaphorepp.hpp.
Referenced by blocked(), guard(), post(), reset(), semaphore(), and wait().