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

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

flaircore

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 Mutex_impl.h
7 * \brief Class defining a mutex
8 * \author Guillaume Sanahuja, Copyright Heudiasyc UMR UTC/CNRS 7253
9 * \date 2012/03/14
10 * \version 4.0
11 */
12
13#ifndef MUTEX_IMPL_H
14#define MUTEX_IMPL_H
15
16#ifdef __XENO__
17#include <native/mutex.h>
18#else
19#include <pthread.h>
20#endif
21
22namespace flair
23{
24 namespace core
25 {
26 class Mutex;
27 }
28}
29
30class Mutex_impl
31{
32 public:
33 Mutex_impl(flair::core::Mutex *self);
34 ~Mutex_impl();
35 void GetMutex(void);
36 void ReleaseMutex(void);
37// bool IsLocked(void);
38#ifdef __XENO__
39 RT_MUTEX mutex;
40#else
41 pthread_mutex_t mutex;
42 //bool flag_locked;
43#endif
44
45 private:
46 flair::core::Mutex *self;
47
48};
49
50#endif // MUTEX_IMPL_H
Note: See TracBrowser for help on using the repository browser.