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> 30 #include <boost/thread/barrier.hpp> 31 #include <boost/shared_ptr.hpp> 34 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 36 #ifndef WIN32_LEAN_AND_MEAN 37 #define WIN32_LEAN_AND_MEAN 52 typedef boost::shared_ptr<barrier> barrier_sptr;
56 #if defined(_WIN32) || defined(__WIN32__) || defined(WIN32) 58 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__) 111 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:49
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:61
#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)
set current thread priority for a given thread ID
boost::thread thread
Definition: thread.h:47
Include this header to use the message passing features.
Definition: logger.h:695
GR_RUNTIME_API int thread_priority(gr_thread_t thread)
get current thread priority for a given thread ID
boost::barrier barrier
Definition: thread.h:51
boost::mutex mutex
Definition: thread.h:48
GR_RUNTIME_API void set_thread_name(gr_thread_t thread, std::string name)
GR_RUNTIME_API void thread_unbind()
Remove any thread-processor affinity for the current thread.
boost::condition_variable condition_variable
Definition: thread.h:50