summaryrefslogtreecommitdiff
path: root/gruel
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2013-03-29 13:26:22 -0400
committerTom Rondeau <trondeau@vt.edu>2013-03-29 13:26:22 -0400
commit73367de69a1384295937945549d210d51a0a19ef (patch)
treeb19f5f71b87cac8497f3a2c90afbd1e62b7d8d00 /gruel
parent2caaabf8e1dd771174fd42e51c8c8090864638e6 (diff)
parent8088f125a9a432de321c62b82755a895d5184080 (diff)
Merge branch 'master' into next
Conflicts: gnuradio-runtime/include/gr_block.h
Diffstat (limited to 'gruel')
-rw-r--r--gruel/src/include/gruel/thread.h6
-rw-r--r--gruel/src/lib/thread.cc40
2 files changed, 23 insertions, 23 deletions
diff --git a/gruel/src/include/gruel/thread.h b/gruel/src/include/gruel/thread.h
index 60832675cd..10c6c38ccc 100644
--- a/gruel/src/include/gruel/thread.h
+++ b/gruel/src/include/gruel/thread.h
@@ -75,7 +75,7 @@ namespace gruel {
* support in this way since 10.5 is not what we want or can use in
* this fashion).
*/
- GRUEL_API void thread_bind_to_processor(const std::vector<unsigned int> &mask);
+ GRUEL_API void thread_bind_to_processor(const std::vector<int> &mask);
/*! \brief Convineince function to bind the current thread to a single core.
*
@@ -87,7 +87,7 @@ namespace gruel {
* support in this way since 10.5 is not what we want or can use in
* this fashion).
*/
- GRUEL_API void thread_bind_to_processor(unsigned int n);
+ GRUEL_API void thread_bind_to_processor(int n);
/*! \brief Bind a thread to a set of cores.
*
@@ -101,7 +101,7 @@ namespace gruel {
* support in this way since 10.5 is not what we want or can use in
* this fashion).
*/
- GRUEL_API void thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask);
+ GRUEL_API void thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask);
/*! \brief Convineince function to bind the a thread to a single core.
diff --git a/gruel/src/lib/thread.cc b/gruel/src/lib/thread.cc
index 8ebe822fbf..a5116b687b 100644
--- a/gruel/src/lib/thread.cc
+++ b/gruel/src/lib/thread.cc
@@ -38,33 +38,33 @@ namespace gruel {
}
void
- thread_bind_to_processor(unsigned int n)
+ thread_bind_to_processor(int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(const std::vector<int> &mask)
{
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, unsigned int n)
+ thread_bind_to_processor(gr_thread_t thread, int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(thread, mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
{
//DWORD_PTR mask = (1 << n);
DWORD_PTR dword_mask = 0;
- std::vector<unsigned int> _mask = mask;
- std::vector<unsigned int>::iterator itr;
+ std::vector<int> _mask = mask;
+ std::vector<int>::iterator itr;
for(itr = _mask.begin(); itr != _mask.end(); itr++)
dword_mask |= (1 << (*itr));
@@ -106,25 +106,25 @@ namespace gruel {
}
void
- thread_bind_to_processor(unsigned int n)
+ thread_bind_to_processor(int n)
{
// Not implemented on OSX
}
void
- thread_bind_to_processor(gr_thread_t thread, unsigned int n)
+ thread_bind_to_processor(gr_thread_t thread, int n)
{
// Not implemented on OSX
}
void
- thread_bind_to_processor(const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(const std::vector<int> &mask)
{
// Not implemented on OSX
}
void
- thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
{
// Not implemented on OSX
}
@@ -157,32 +157,32 @@ namespace gruel {
}
void
- thread_bind_to_processor(unsigned int n)
+ thread_bind_to_processor(int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(const std::vector<int> &mask)
{
thread_bind_to_processor(get_current_thread_id(), mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, unsigned int n)
+ thread_bind_to_processor(gr_thread_t thread, int n)
{
- std::vector<unsigned int> mask(1, n);
+ std::vector<int> mask(1, n);
thread_bind_to_processor(thread, mask);
}
void
- thread_bind_to_processor(gr_thread_t thread, const std::vector<unsigned int> &mask)
+ thread_bind_to_processor(gr_thread_t thread, const std::vector<int> &mask)
{
cpu_set_t set;
size_t len = sizeof(cpu_set_t);
- std::vector<unsigned int> _mask = mask;
- std::vector<unsigned int>::iterator itr;
+ std::vector<int> _mask = mask;
+ std::vector<int>::iterator itr;
CPU_ZERO(&set);
for(itr = _mask.begin(); itr != _mask.end(); itr++)