commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 03/14: runtime: android: Android does not s


From: git
Subject: [Commit-gnuradio] [gnuradio] 03/14: runtime: android: Android does not support pthread_setaffinity_np; turned this into a nop call.
Date: Thu, 12 Mar 2015 19:38:13 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch android
in repository gnuradio.

commit e6aeeff1efbbe6f78addb588f4b5433f88ac1893
Author: Tom Rondeau <address@hidden>
Date:   Sun Dec 21 09:28:25 2014 -0500

    runtime: android: Android does not support pthread_setaffinity_np; turned 
this into a nop call.
    
    runtime: adding string header to thread.
---
 gnuradio-runtime/lib/thread/thread.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/gnuradio-runtime/lib/thread/thread.cc 
b/gnuradio-runtime/lib/thread/thread.cc
index 483dfed..796899e 100644
--- a/gnuradio-runtime/lib/thread/thread.cc
+++ b/gnuradio-runtime/lib/thread/thread.cc
@@ -241,6 +241,7 @@ namespace gr {
 
 #include <sstream>
 #include <stdexcept>
+#include <string>
 #include <pthread.h>
 #include <sys/prctl.h>
 
@@ -285,7 +286,12 @@ namespace gr {
       for(itr = _mask.begin(); itr != _mask.end(); itr++)
         CPU_SET(*itr, &set);
 
+#if !ANDROID
       int ret = pthread_setaffinity_np(thread, len, &set);
+#else
+      int ret = 0;
+#endif
+
       if(ret != 0) {
         std::stringstream s;
         s << "thread_bind_to_processor failed with error: " << ret << 
std::endl;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]