21 #ifndef INCLUDED_THREAD_H
22 #define INCLUDED_THREAD_H
25 #include <boost/thread/thread.hpp>
26 #include <boost/thread/mutex.hpp>
27 #include <boost/thread/locks.hpp>
28 #include <boost/thread/condition_variable.hpp>
31 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
33 #ifndef WIN32_LEAN_AND_MEAN
34 #define WIN32_LEAN_AND_MEAN
50 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
52 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
#define GRUEL_API
Definition: gruel/src/include/gruel/api.h:30
boost::condition_variable condition_variable
Definition: thread.h:46
GRUEL_API gr_thread_t get_current_thread_id()
Get the current thread's ID as a gr_thread_t.
boost::mutex mutex
Definition: thread.h:44
boost::unique_lock< boost::mutex > scoped_lock
Definition: thread.h:45
GRUEL_API void thread_bind_to_processor(const std::vector< int > &mask)
Bind the current thread to a set of cores.
pthread_t gr_thread_t
a system-dependent typedef for the underlying thread type.
Definition: thread.h:55
boost::thread thread
Definition: thread.h:43
GRUEL_API void thread_unbind()
Remove any thread-processor affinity for the current thread.