11#ifndef INCLUDED_THREAD_H
12#define INCLUDED_THREAD_H
15#include <boost/thread/barrier.hpp>
16#include <boost/thread/condition_variable.hpp>
17#include <boost/thread/locks.hpp>
18#include <boost/thread/mutex.hpp>
19#include <boost/thread/thread.hpp>
23#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
25#ifndef WIN32_LEAN_AND_MEAN
26#define WIN32_LEAN_AND_MEAN
41typedef std::shared_ptr<barrier> barrier_sptr;
45#if defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
47#elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
100 const std::vector<int>& mask);
#define GR_RUNTIME_API
Definition: gnuradio-runtime/include/gnuradio/api.h:18
boost::barrier barrier
Definition: thread.h:40
boost::mutex mutex
Definition: thread.h:37
boost::unique_lock< boost::mutex > scoped_lock
Definition: thread.h:38
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:36
pthread_t gr_thread_t
a system-dependent typedef for the underlying thread type.
Definition: thread.h:50
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:39
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