diff options
author | JackLivio <jack@livio.io> | 2018-10-19 15:05:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-19 15:05:09 -0400 |
commit | d36316738785c96dab2ee892762ed08c059fffde (patch) | |
tree | 168a7c0705b5bc8f0dee7ce4b511ccf71759d9b4 /src/components/include/utils/conditional_variable.h | |
parent | 7f7fcbb998fb17f2954fd103349af67ea9b71a3f (diff) | |
parent | 83c5e805346d55ec7fb9f4ba8b6f6855d992273e (diff) | |
download | sdl_core-hotfix/templates_updates.tar.gz |
Merge pull request #2572 from smartdevicelink/release/5.0.05.0.0hotfix/templates_updatesfeature/show_app_menufeature/progress_bar_seekfeature/open-menu-rpcfeature/open-menu-rfeature/button
Release 5.0.0
Diffstat (limited to 'src/components/include/utils/conditional_variable.h')
-rw-r--r-- | src/components/include/utils/conditional_variable.h | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/src/components/include/utils/conditional_variable.h b/src/components/include/utils/conditional_variable.h index f54a22e993..a29f255dbf 100644 --- a/src/components/include/utils/conditional_variable.h +++ b/src/components/include/utils/conditional_variable.h @@ -32,24 +32,13 @@ #ifndef SRC_COMPONENTS_INCLUDE_UTILS_CONDITIONAL_VARIABLE_H_ #define SRC_COMPONENTS_INCLUDE_UTILS_CONDITIONAL_VARIABLE_H_ -#if defined(OS_POSIX) -#include <pthread.h> -#else -#error Please implement conditional variable for your OS -#endif #include <stdint.h> +#include <boost/thread/condition_variable.hpp> +#include "utils/lock.h" #include "utils/macro.h" namespace sync_primitives { -class AutoLock; -class Lock; - -namespace impl { -#if defined(OS_POSIX) -typedef pthread_cond_t PlatformConditionalVariable; -#endif -} // namespace impl /* * Conditional variable wrapper @@ -82,11 +71,11 @@ class ConditionalVariable { // Wait forever or up to milliseconds time limit bool Wait(AutoLock& auto_lock); - bool Wait(Lock& lock); + bool Wait(BaseLock& lock); WaitStatus WaitFor(AutoLock& auto_lock, uint32_t milliseconds); private: - impl::PlatformConditionalVariable cond_var_; + boost::condition_variable_any cond_var_; private: DISALLOW_COPY_AND_ASSIGN(ConditionalVariable); |