implemented counting semaph for linux
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
#include <framework/tasks/SemaphoreFactory.h>
|
||||
#include <framework/osal/linux/BinarySemaphore.h>
|
||||
#include <framework/osal/linux/CountingSemaphore.h>
|
||||
#include <framework/serviceinterface/ServiceInterfaceStream.h>
|
||||
|
||||
const uint32_t SemaphoreIF::NO_TIMEOUT = 0;
|
||||
@ -25,11 +26,9 @@ SemaphoreIF* SemaphoreFactory::createBinarySemaphore(uint32_t arguments) {
|
||||
return new BinarySemaphore();
|
||||
}
|
||||
|
||||
SemaphoreIF* SemaphoreFactory::createCountingSemaphore(uint8_t count,
|
||||
SemaphoreIF* SemaphoreFactory::createCountingSemaphore(const uint8_t maxCount,
|
||||
uint8_t initCount, uint32_t arguments) {
|
||||
sif::error << "Counting Semaphore not implemented for "
|
||||
"Linux yet" << std::endl;
|
||||
return nullptr;
|
||||
return new CountingSemaphore(maxCount, initCount);
|
||||
}
|
||||
|
||||
void SemaphoreFactory::deleteSemaphore(SemaphoreIF* semaphore) {
|
||||
|
Reference in New Issue
Block a user