mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-31 00:24:51 +00:00
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.
|
||||
*/
|
||||
|
||||
#include <base/env.h>
|
||||
#include <base/printf.h>
|
||||
#include <os/timed_semaphore.h>
|
||||
|
||||
#include <semaphore.h>
|
||||
|
||||
using namespace Genode;
|
||||
@ -25,9 +24,9 @@ extern "C" {
|
||||
* This class is named 'struct sem' because the 'sem_t' type is
|
||||
* 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…
x
Reference in New Issue
Block a user