diff options
Diffstat (limited to 'os/various/cpp_wrappers/ch.cpp')
-rw-r--r-- | os/various/cpp_wrappers/ch.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/os/various/cpp_wrappers/ch.cpp b/os/various/cpp_wrappers/ch.cpp index 1ada921da..5faf6d37c 100644 --- a/os/various/cpp_wrappers/ch.cpp +++ b/os/various/cpp_wrappers/ch.cpp @@ -303,21 +303,51 @@ namespace chibios_rt { chSemReset(&sem, n);
}
+ void Semaphore::resetI(cnt_t n) {
+
+ chSemResetI(&sem, n);
+ }
+
msg_t Semaphore::wait(void) {
return chSemWait(&sem);
}
+ msg_t Semaphore::waitS(void) {
+
+ return chSemWaitS(&sem);
+ }
+
msg_t Semaphore::waitTimeout(systime_t time) {
return chSemWaitTimeout(&sem, time);
}
+ msg_t Semaphore::waitTimeoutS(systime_t time) {
+
+ return chSemWaitTimeoutS(&sem, time);
+ }
+
void Semaphore::signal(void) {
chSemSignal(&sem);
}
+ void Semaphore::signalI(void) {
+
+ chSemSignalI(&sem);
+ }
+
+ void Semaphore::addCounterI(cnt_t n) {
+
+ chSemAddCounterI(&sem, n);
+ }
+
+ cnt_t Semaphore::getCounterI(void) {
+
+ return chSemGetCounterI(&sem);
+ }
+
#if CH_USE_SEMSW
msg_t Semaphore::signalWait(Semaphore *ssem, Semaphore *wsem) {
|