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

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

use less bandwidth in vprnlite

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 {
25namespace core {
26class ConditionVariable;
27}
28}
29
30/*! \class ConditionVariable_impl
31* \brief Class defining a condition variable
32*
33*/
34class ConditionVariable_impl {
35
36public:
37  ConditionVariable_impl(flair::core::ConditionVariable *self);
38  ~ConditionVariable_impl();
39  bool CondWait(flair::core::Time timeout);
40  bool CondWaitUntil(flair::core::Time date);
41  void CondSignal(void);
42
43private:
44  flair::core::ConditionVariable *self;
45#ifdef __XENO__
46  RT_COND m_ResumeCond;
47#else
48  pthread_cond_t m_ResumeCond;
49#endif
50};
51
52#endif // CONDITIONVARIABLE_IMPL_H
Note: See TracBrowser for help on using the repository browser.