source: flair-src/trunk/lib/FlairCore/src/unexported/Semaphore_impl.h@ 127

Last change on this file since 127 was 127, checked in by Thomas Fuhrmann, 8 years ago

Add missing unexported for semaphore

File size: 885 bytes
Line 
1// %flair:license{
2// This file is part of the Flair framework distributed under the
3// CECILL-C License, Version 1.0.
4// %flair:license}
5/*!
6 * \file Semaphore_impl.h
7 * \brief Class defining a semaphore implementation
8 * \author Thomas Fuhrmann, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2016/11/16
10 * \version 1.0
11 */
12
13#ifndef SEMAPHORE_IMPL_H
14#define SEMAPHORE_IMPL_H
15
16#ifdef __XENO__
17#include <native/sem.h>
18#else
19#include <semaphore.h>
20#endif
21
22namespace flair {
23namespace core {
24class Semaphore;
25class Object;
26}
27}
28
29class Semaphore_impl {
30public:
31 Semaphore_impl(flair::core::Semaphore *self, uint32_t initialValue);
32 ~Semaphore_impl();
33 bool GetSemaphore(flair::core::Time timeout = TIME_INFINITE);
34 bool ReleaseSemaphore(void);
35#ifdef __XENO__
36 RT_SEM semaphore;
37#else
38 sem_t semaphore;
39#endif
40
41private:
42 flair::core::Semaphore *self;
43};
44
45#endif // SEMAPHORE_IMPL_H
Note: See TracBrowser for help on using the repository browser.