diff options
Diffstat (limited to 'gruel/src/lib/thread.cc')
-rw-r--r-- | gruel/src/lib/thread.cc | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/gruel/src/lib/thread.cc b/gruel/src/lib/thread.cc index 8ebe822fb..a5116b687 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++) |