Last change
on this file since 197 was 15, checked in by Bayard Gildas, 8 years ago |
sources reformatted with flair-format-dir script
|
File size:
1.0 KB
|
Rev | Line | |
---|
[2] | 1 | // %flair:license{
|
---|
[15] | 2 | // This file is part of the Flair framework distributed under the
|
---|
| 3 | // CECILL-C License, Version 1.0.
|
---|
[2] | 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 |
|
---|
| 24 | namespace flair {
|
---|
[15] | 25 | namespace core {
|
---|
| 26 | class ConditionVariable;
|
---|
[2] | 27 | }
|
---|
[15] | 28 | }
|
---|
[2] | 29 |
|
---|
| 30 | /*! \class ConditionVariable_impl
|
---|
| 31 | * \brief Class defining a condition variable
|
---|
| 32 | *
|
---|
| 33 | */
|
---|
[15] | 34 | class ConditionVariable_impl {
|
---|
[2] | 35 |
|
---|
[15] | 36 | public:
|
---|
| 37 | ConditionVariable_impl(flair::core::ConditionVariable *self);
|
---|
| 38 | ~ConditionVariable_impl();
|
---|
| 39 | void CondWait(void);
|
---|
| 40 | bool CondWaitUntil(flair::core::Time date);
|
---|
| 41 | void CondSignal(void);
|
---|
[2] | 42 |
|
---|
[15] | 43 | private:
|
---|
| 44 | flair::core::ConditionVariable *self;
|
---|
[2] | 45 | #ifdef __XENO__
|
---|
[15] | 46 | RT_COND m_ResumeCond;
|
---|
[2] | 47 | #else
|
---|
[15] | 48 | pthread_cond_t m_ResumeCond;
|
---|
[2] | 49 | #endif
|
---|
| 50 | };
|
---|
| 51 |
|
---|
| 52 | #endif // CONDITIONVARIABLE_IMPL_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.