pthreads: use simple Genode::Semaphore as backend

Instead of using Timed_semaphore, we can directly use the simpler
Genode::Semaphore for pthread's 'sem_t' type.

Ref #1333
This commit is contained in:
Stefan Kalkowski 2015-12-03 11:22:46 +01:00 committed by Christian Helmuth
parent 492bd39619
commit 9efa3ceccf
1 changed files with 3 additions and 4 deletions

View File

@ -12,9 +12,8 @@
* under the terms of the GNU General Public License version 2. * under the terms of the GNU General Public License version 2.
*/ */
#include <base/env.h>
#include <base/printf.h> #include <base/printf.h>
#include <os/timed_semaphore.h>
#include <semaphore.h> #include <semaphore.h>
using namespace Genode; using namespace Genode;
@ -25,9 +24,9 @@ extern "C" {
* This class is named 'struct sem' because the 'sem_t' type is * This class is named 'struct sem' because the 'sem_t' type is
* defined as 'struct sem*' in 'semaphore.h' * defined as 'struct sem*' in 'semaphore.h'
*/ */
struct sem : Timed_semaphore struct sem : Semaphore
{ {
sem(int value) : Timed_semaphore(value) { } sem(int value) : Semaphore(value) { }
}; };