client-cpp  0.8.1
KaaThread.hpp File Reference
#include "kaa/KaaDefaults.hpp"
#include <mutex>
#include <atomic>
#include <condition_variable>
+ Include dependency graph for KaaThread.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KAA_MUTEX   std::mutex
 
#define KAA_R_MUTEX   std::recursive_mutex
 
#define KAA_MUTEX_UNIQUE   std::unique_lock<KAA_MUTEX>
 
#define KAA_R_MUTEX_UNIQUE   std::unique_lock<KAA_R_MUTEX>
 
#define KAA_LOCK(mtx)   mtx.lock()
 
#define KAA_UNLOCK(mtx)   mtx.unlock()
 
#define KAA_CONDITION_VARIABLE   std::condition_variable
 
#define KAA_CONDITION_WAIT(cond, lck)   cond.wait(lck)
 
#define KAA_CONDITION_WAIT_PRED(cond, lck, pred)   cond.wait(lck, pred)
 
#define KAA_CONDITION_NOTIFY(cond)   cond.notify_one()
 
#define KAA_CONDITION_NOTIFY_ALL(cond)   cond.notify_all()
 
#define KAA_CONDITION_VARIABLE_DECLARE(name)   KAA_CONDITION_VARIABLE name
 
#define KAA_MUTEX_DECLARE(name)   KAA_MUTEX name
 
#define KAA_MUTEX_MUTABLE_DECLARE(name)   mutable KAA_MUTEX_DECLARE(name)
 
#define KAA_R_MUTEX_DECLARE(name)   KAA_R_MUTEX name
 
#define KAA_R_MUTEX_MUTABLE_DECLARE(name)   mutable KAA_R_MUTEX_DECLARE(name)
 
#define KAA_MUTEX_UNIQUE_DECLARE(name, mtx)   KAA_MUTEX_UNIQUE name(mtx)
 
#define KAA_R_MUTEX_UNIQUE_DECLARE(name, mtx)   KAA_R_MUTEX_UNIQUE name(mtx)
 
#define kaa_thread_local   thread_local
 

Typedefs

typedef std::atomic_bool bool_type
 
typedef std::atomic_int_fast32_t RequestId
 

Macro Definition Documentation

#define KAA_CONDITION_NOTIFY (   cond)    cond.notify_one()

Definition at line 40 of file KaaThread.hpp.

#define KAA_CONDITION_NOTIFY_ALL (   cond)    cond.notify_all()

Definition at line 41 of file KaaThread.hpp.

#define KAA_CONDITION_VARIABLE   std::condition_variable

Definition at line 37 of file KaaThread.hpp.

#define KAA_CONDITION_VARIABLE_DECLARE (   name)    KAA_CONDITION_VARIABLE name

Definition at line 43 of file KaaThread.hpp.

#define KAA_CONDITION_WAIT (   cond,
  lck 
)    cond.wait(lck)

Definition at line 38 of file KaaThread.hpp.

#define KAA_CONDITION_WAIT_PRED (   cond,
  lck,
  pred 
)    cond.wait(lck, pred)

Definition at line 39 of file KaaThread.hpp.

#define KAA_LOCK (   mtx)    mtx.lock()

Definition at line 34 of file KaaThread.hpp.

#define KAA_MUTEX   std::mutex

Copyright 2014-2016 CyberVision, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

 http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition at line 28 of file KaaThread.hpp.

#define KAA_MUTEX_DECLARE (   name)    KAA_MUTEX name

Definition at line 44 of file KaaThread.hpp.

#define KAA_MUTEX_MUTABLE_DECLARE (   name)    mutable KAA_MUTEX_DECLARE(name)

Definition at line 45 of file KaaThread.hpp.

#define KAA_MUTEX_UNIQUE   std::unique_lock<KAA_MUTEX>

Definition at line 31 of file KaaThread.hpp.

#define KAA_MUTEX_UNIQUE_DECLARE (   name,
  mtx 
)    KAA_MUTEX_UNIQUE name(mtx)

Definition at line 48 of file KaaThread.hpp.

#define KAA_R_MUTEX   std::recursive_mutex

Definition at line 29 of file KaaThread.hpp.

#define KAA_R_MUTEX_DECLARE (   name)    KAA_R_MUTEX name

Definition at line 46 of file KaaThread.hpp.

#define KAA_R_MUTEX_MUTABLE_DECLARE (   name)    mutable KAA_R_MUTEX_DECLARE(name)

Definition at line 47 of file KaaThread.hpp.

#define KAA_R_MUTEX_UNIQUE   std::unique_lock<KAA_R_MUTEX>

Definition at line 32 of file KaaThread.hpp.

#define KAA_R_MUTEX_UNIQUE_DECLARE (   name,
  mtx 
)    KAA_R_MUTEX_UNIQUE name(mtx)

Definition at line 49 of file KaaThread.hpp.

#define kaa_thread_local   thread_local

Definition at line 58 of file KaaThread.hpp.

#define KAA_UNLOCK (   mtx)    mtx.unlock()

Definition at line 35 of file KaaThread.hpp.

Typedef Documentation

typedef std::atomic_bool bool_type

Definition at line 54 of file KaaThread.hpp.

typedef std::atomic_int_fast32_t RequestId

Definition at line 56 of file KaaThread.hpp.