MatLogger2  1.0.0
Library for logging of numeric data to HDF5 MAT-files, which is RT-safe and multithreaded.
thread.h
Go to the documentation of this file.
1 #ifndef __XBOT_MATLOGGER2_UTIL_THREAD_H__
2 #define __XBOT_MATLOGGER2_UTIL_THREAD_H__
3 
4 /* Conditionally define mutex, condition_variable and thread classes based on
5  * whether we're compiling for Xenomai3 or not */
6 
7 
8 
9 #ifndef MATLOGGER2_USE_POSIX_THREAD
10 
11  /* Use threads from C++ library */
12 
13  #include <mutex>
14  #include <condition_variable>
15  #include <thread>
16 
17  namespace XBot { namespace matlogger2 {
18 
19  typedef std::mutex MutexType;
20  typedef std::condition_variable CondVarType;
21  typedef std::thread ThreadType;
22 
23  } }
24 
25 #else
26 
27  #include "thread_replacement.h"
28 
29  namespace XBot { namespace matlogger2 {
30 
34 
35  } }
36 
37 #endif
38 
39 #endif
std::thread ThreadType
Definition: thread.h:21
std::condition_variable CondVarType
Definition: thread.h:20
std::mutex MutexType
Definition: thread.h:19