diff options
author | Josh Blum | 2013-05-11 16:20:08 -0700 |
---|---|---|
committer | Josh Blum | 2013-05-11 16:20:08 -0700 |
commit | 4e210ade63d800b1a8671999f19019abd3c2ae03 (patch) | |
tree | b23f026eb0ba161ebf8ae59087f5c51031946bec /include/gras | |
parent | 476e5e7f8c949251436646dfd155cdd4430c37f2 (diff) | |
download | sandhi-4e210ade63d800b1a8671999f19019abd3c2ae03.tar.gz sandhi-4e210ade63d800b1a8671999f19019abd3c2ae03.tar.bz2 sandhi-4e210ade63d800b1a8671999f19019abd3c2ae03.zip |
gras: created new test_thread_priority api call
Diffstat (limited to 'include/gras')
-rw-r--r-- | include/gras/thread_pool.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/gras/thread_pool.hpp b/include/gras/thread_pool.hpp index e62da3a..2d25178 100644 --- a/include/gras/thread_pool.hpp +++ b/include/gras/thread_pool.hpp @@ -83,6 +83,17 @@ struct GRAS_API ThreadPool : boost::shared_ptr<Theron::Framework> * thread pool that the block's work routine will run in. */ void set_active(void); + + /*! + * Test that a particular thread priority setting is possible. + * + * Highly OS dependent! Some OS require special permissions, + * or security settings to use real time priority setting. + * + * \param thread_priority range -1.0f to 1.0f, 0.0f is "normal" + * \return true if the priority change is possible + */ + static bool test_thread_priority(const float thread_priority); }; } //namespace gras |