22 #ifndef INCLUDED_THREAD_H
23 #define INCLUDED_THREAD_H
26 #include <boost/thread/thread.hpp>
27 #include <boost/thread/mutex.hpp>
28 #include <boost/thread/locks.hpp>
29 #include <boost/thread/condition_variable.hpp>
32 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
34 #ifndef WIN32_LEAN_AND_MEAN
35 #define WIN32_LEAN_AND_MEAN
52 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
54 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
107 const std::vector<int> &mask);
GR_RUNTIME_API gr_thread_t get_current_thread_id()
Get the current thread's ID as a gr_thread_t.
boost::unique_lock< boost::mutex > scoped_lock
Definition: thread.h:47
GR_RUNTIME_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:57
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:30
GR_RUNTIME_API int set_thread_priority(gr_thread_t thread, int priority)
get current thread priority for a given thread ID
boost::thread thread
Definition: thread.h:45
GR_RUNTIME_API int thread_priority(gr_thread_t thread)
get current thread priority for a given thread ID
boost::mutex mutex
Definition: thread.h:46
GR_RUNTIME_API void thread_unbind()
Remove any thread-processor affinity for the current thread.
boost::condition_variable condition_variable
Definition: thread.h:48