GNU Radio 3.6.5 C++ API

thread.h File Reference

#include <gruel/api.h>
#include <boost/thread/thread.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/locks.hpp>
#include <boost/thread/condition_variable.hpp>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  gruel
 

Include this header to use the message passing features.


Typedefs

typedef boost::thread gruel::thread
typedef boost::mutex gruel::mutex
typedef boost::unique_lock
< boost::mutex > 
gruel::scoped_lock
typedef boost::condition_variable gruel::condition_variable
typedef pthread_t gruel::gr_thread_t
 a system-dependent typedef for the underlying thread type.

Functions

GRUEL_API gr_thread_t gruel::get_current_thread_id ()
 Get the current thread's ID as a gr_thread_t.
GRUEL_API void gruel::thread_bind_to_processor (const std::vector< int > &mask)
 Bind the current thread to a set of cores.
GRUEL_API void gruel::thread_bind_to_processor (int n)
 Convineince function to bind the current thread to a single core.
GRUEL_API void gruel::thread_bind_to_processor (gr_thread_t thread, const std::vector< int > &mask)
 Bind a thread to a set of cores.
GRUEL_API void gruel::thread_bind_to_processor (gr_thread_t thread, unsigned int n)
 Convineince function to bind the a thread to a single core.
GRUEL_API void gruel::thread_unbind ()
 Remove any thread-processor affinity for the current thread.
GRUEL_API void gruel::thread_unbind (gr_thread_t thread)
 Remove any thread-processor affinity for a given thread ID.