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:
parent
492bd39619
commit
9efa3ceccf
|
@ -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) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue