Sem.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 //----------------------------------------------------------------------
26 //----------------------------------------------------------------------
27 #ifndef ICL_CORE_THREAD_SEM_H_INCLUDED
28 #define ICL_CORE_THREAD_SEM_H_INCLUDED
29 
30 #include <icl_core/BaseTypes.h>
31 #include <icl_core/Noncopyable.h>
32 #include <icl_core/TimeSpan.h>
33 #include <icl_core/TimeStamp.h>
34 
36 
37 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
38 # include "icl_core/Deprecate.h"
39 #endif
40 
41 namespace icl_core {
42 namespace thread {
43 
44 class SemaphoreImpl;
45 
49 {
50 public:
51  Semaphore(size_t initial_value);
52  virtual ~Semaphore();
53 
56  void post();
57 
64  bool tryWait();
65 
72  bool wait();
73 
80  bool wait(const icl_core::TimeSpan& timeout);
81 
88  bool wait(const icl_core::TimeStamp& timeout);
89 
91 #ifdef _IC_BUILDER_DEPRECATED_STYLE_
92 
97 
102 
107 
112 
117 
118 #endif
119 
121 private:
123 };
124 
125 }
126 }
127 
128 #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.
SemaphoreImpl * m_impl
Definition: Sem.h:122
#define ICL_CORE_THREAD_IMPORT_EXPORT
const TimeSpan timeout(1, 0)
Repesents absolute times.
Definition: TimeSpan.h:46
Contains Interface base classes and base types.
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