Mutex.h
Go to the documentation of this file.
1 // this is for emacs file handling -*- mode: c++; indent-tabs-mode: nil -*-
2 
3 // -- BEGIN LICENSE BLOCK ----------------------------------------------
4 // This file is part of FZIs ic_workspace.
5 //
6 // This program is free software licensed under the LGPL
7 // (GNU LESSER GENERAL PUBLIC LICENSE Version 3).
8 // You can find a copy of this license in LICENSE folder in the top
9 // directory of the source code.
10 //
11 // © Copyright 2016 FZI Forschungszentrum Informatik, Karlsruhe, Germany
12 //
13 // -- END LICENSE BLOCK ------------------------------------------------
14 
15 //----------------------------------------------------------------------
27 //----------------------------------------------------------------------
28 #ifndef ICL_CORE_THREAD_MUTEX_H_INCLUDED
29 #define ICL_CORE_THREAD_MUTEX_H_INCLUDED
30 
31 #include "icl_core/Noncopyable.h"
32 #include "icl_core/TimeSpan.h"
33 #include "icl_core/TimeStamp.h"
35 
36 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
37 # include "icl_core/Deprecate.h"
38 #endif
39 
40 namespace icl_core {
41 namespace thread {
42 
43 class MutexImpl;
44 
48 {
49 public:
52  Mutex();
53 
56  virtual ~Mutex();
57 
62  bool lock();
63 
68  bool lock(const ::icl_core::TimeStamp& timeout);
69 
74  bool lock(const ::icl_core::TimeSpan& timeout);
75 
82  bool tryLock();
83 
86  void unlock();
87 
89 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
90 
96 
101  ICL_CORE_VC_DEPRECATE_STYLE bool Lock(const icl_core::TimeStamp& timeout)
103 
108  ICL_CORE_VC_DEPRECATE_STYLE bool Lock(const icl_core::TimeSpan& timeout)
110 
118 
122 
123 #endif
124 
126 private:
128 };
129 
130 }
131 }
132 
133 #endif
Represents absolute times.
Definition: TimeStamp.h:61
#define ICL_CORE_VC_DEPRECATE_STYLE
Definition: Deprecate.h:53
Contains macros to deprecate classes, types, functions and variables.
Contains import/export definitions for the Win32 plattform.
#define ICL_CORE_THREAD_IMPORT_EXPORT
const TimeSpan timeout(1, 0)
Repesents absolute times.
Definition: TimeSpan.h:46
MutexImpl * m_impl
Definition: Mutex.h:127
Contains TimeStamp.
Contains icl_core::Noncopyable.
#define ICL_CORE_GCC_DEPRECATE_STYLE
Definition: Deprecate.h:54


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:58