/*
 * Copyright 2015 Telenav Inc. All rights reserved.
 */
#ifndef TN_FOUNDATION_MUTEX_HPP
#define TN_FOUNDATION_MUTEX_HPP

#include "foundation/cxx11compat.hpp"

#if _TN_FOUNDATION_USE_STD
#  include <mutex>
#else
#  include "boost/thread/mutex.hpp"
#  include "boost/thread/locks.hpp"
#  include "boost/thread/recursive_mutex.hpp"
#endif 

namespace tn {

using _TN_FOUNDATION_STD_NS::mutex;
using _TN_FOUNDATION_STD_NS::recursive_mutex;
using _TN_FOUNDATION_STD_NS::lock_guard;
using _TN_FOUNDATION_STD_NS::unique_lock;
using _TN_FOUNDATION_STD_NS::adopt_lock_t;
using _TN_FOUNDATION_STD_NS::defer_lock_t;
using _TN_FOUNDATION_STD_NS::try_to_lock_t;
using _TN_FOUNDATION_STD_NS::adopt_lock;
using _TN_FOUNDATION_STD_NS::adopt_lock_t;
using _TN_FOUNDATION_STD_NS::defer_lock;
using _TN_FOUNDATION_STD_NS::try_to_lock;

#if TN_PLATFORM_ANDROID && _GLIBCXX_MUTEX
#  pragma message("timed_mutex is not provided by GNU STL on Android, use LLVM STL (APP_STL:=llvm-libc++) if you need it.")
#else
using _TN_FOUNDATION_STD_NS::timed_mutex;
#endif

} // namespace tn

#endif /* TN_FOUNDATION_MUTEX_HPP */
