11#ifndef INCLUDED_THREAD_H
12#define INCLUDED_THREAD_H
14#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
15#ifndef WIN32_LEAN_AND_MEAN
16#define WIN32_LEAN_AND_MEAN
22#include <boost/thread/barrier.hpp>
23#include <boost/thread/condition_variable.hpp>
24#include <boost/thread/locks.hpp>
25#include <boost/thread/mutex.hpp>
26#include <boost/thread/thread.hpp>
38typedef std::shared_ptr<barrier> barrier_sptr;
42#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
44#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
STL class.
Definition vector_docstub.h:11
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
boost::barrier barrier
Definition thread.h:37
boost::mutex mutex
Definition thread.h:34
boost::unique_lock< boost::mutex > scoped_lock
Definition thread.h:35
GR_RUNTIME_API void set_thread_name(gr_thread_t thread, std::string name)
GR_RUNTIME_API int thread_priority(gr_thread_t thread)
get current thread priority for a given thread ID
GR_RUNTIME_API int set_thread_priority(gr_thread_t thread, int priority)
set current thread priority for a given thread ID
GR_RUNTIME_API void thread_unbind()
Remove any thread-processor affinity for the current thread.
boost::thread thread
Definition thread.h:33
pthread_t gr_thread_t
a system-dependent typedef for the underlying thread type.
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.
boost::condition_variable condition_variable
Definition thread.h:36
GR_RUNTIME_API gr_thread_t get_current_thread_id()
Get the current thread's ID as a gr_thread_t.
GNU Radio logging wrapper.
Definition basic_block.h:29