source: flair-src/trunk/lib/FlairCore/src/unexported/ConditionVariable_impl.h @ 2

Last change on this file since 2 was 2, checked in by Sanahuja Guillaume, 6 years ago

flaircore

File size: 1.1 KB
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 ConditionVariable_impl.h
7 * \brief Class defining a condition variable
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2014/02/07
10 * \version 4.0
11 */
12
13#ifndef CONDITIONVARIABLE_IMPL_H
14#define CONDITIONVARIABLE_IMPL_H
15
16#include "Object.h"
17#ifdef __XENO__
18#include <native/cond.h>
19#include <native/timer.h>
20#else
21#include <pthread.h>
22#endif
23
24namespace flair {
25    namespace core {
26        class ConditionVariable;
27    }
28}
29
30/*! \class ConditionVariable_impl
31* \brief Class defining a condition variable
32*
33*/
34class ConditionVariable_impl
35{
36
37    public:
38        ConditionVariable_impl(flair::core::ConditionVariable* self);
39        ~ConditionVariable_impl();
40        void CondWait(void);
41        bool CondWaitUntil(flair::core::Time date);
42        void CondSignal(void);
43
44    private:
45        flair::core::ConditionVariable* self;
46#ifdef __XENO__
47        RT_COND m_ResumeCond;
48#else
49        pthread_cond_t m_ResumeCond;
50#endif
51};
52
53#endif // CONDITIONVARIABLE_IMPL_H
Note: See TracBrowser for help on using the repository browser.