Merge pull request #4579 from geky/rtos-unbreak-semaphore

RTOS: Fix semaphore
pull/4592/head
Jimmy Brisson 2017-06-19 15:32:48 -05:00 committed by GitHub
commit 77b6127a71
2 changed files with 6 additions and 1 deletions

View File

@ -1014,6 +1014,11 @@ extern "C" void EvrRtxMutexError (osMutexId_t mutex_id, int32_t status)
extern "C" void EvrRtxSemaphoreError (osSemaphoreId_t semaphore_id, int32_t status)
{
// Ignore semaphore overflow, the count will saturate with a returned error
if (status == osRtxErrorSemaphoreCountLimit) {
return;
}
error("Semaphore %p error %i\r\n", semaphore_id, status);
}

View File

@ -27,7 +27,7 @@
namespace rtos {
Semaphore::Semaphore(int32_t count) {
constructor(count, 1024);
constructor(count, 0xffff);
}
Semaphore::Semaphore(int32_t count, uint16_t max_count) {