Last change
on this file was 15, checked in by Bayard Gildas, 9 years ago |
sources reformatted with flair-format-dir script
|
File size:
803 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 |
|
---|
22 | namespace flair {
|
---|
23 | namespace core {
|
---|
24 | class Mutex;
|
---|
25 | }
|
---|
26 | }
|
---|
27 |
|
---|
28 | class Mutex_impl {
|
---|
29 | public:
|
---|
30 | Mutex_impl(flair::core::Mutex *self);
|
---|
31 | ~Mutex_impl();
|
---|
32 | void GetMutex(void);
|
---|
33 | void ReleaseMutex(void);
|
---|
34 | // bool IsLocked(void);
|
---|
35 | #ifdef __XENO__
|
---|
36 | RT_MUTEX mutex;
|
---|
37 | #else
|
---|
38 | pthread_mutex_t mutex;
|
---|
39 | // bool flag_locked;
|
---|
40 | #endif
|
---|
41 |
|
---|
42 | private:
|
---|
43 | flair::core::Mutex *self;
|
---|
44 | };
|
---|
45 |
|
---|
46 | #endif // MUTEX_IMPL_H
|
---|
Note:
See
TracBrowser
for help on using the repository browser.