[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 06/12: android: runtime: Android does not s
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 06/12: android: runtime: Android does not support pthread_setaffinity_np; turned this into a nop call. |
Date: |
Fri, 19 Feb 2016 13:58:39 +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 b13a209a40ac34afaf7129eab04380e80e9760c7
Author: Tom Rondeau <address@hidden>
Date: Sun Dec 21 09:28:25 2014 -0500
android: runtime: Android does not support pthread_setaffinity_np; turned
this into a nop call.
---
gnuradio-runtime/lib/CMakeLists.txt | 2 +-
gnuradio-runtime/lib/thread/thread.cc | 11 +++++++++++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/gnuradio-runtime/lib/CMakeLists.txt
b/gnuradio-runtime/lib/CMakeLists.txt
index f1add80..e8ec204 100644
--- a/gnuradio-runtime/lib/CMakeLists.txt
+++ b/gnuradio-runtime/lib/CMakeLists.txt
@@ -162,7 +162,7 @@ IF(HAVE_WINDOWS_H)
ENDIF(HAVE_WINDOWS_H)
#need to link with librt on ubuntu 11.10 for shm_*
-if(LINUX)
+if(LINUX AND !ANDROID)
list(APPEND gnuradio_runtime_libs rt)
endif()
diff --git a/gnuradio-runtime/lib/thread/thread.cc
b/gnuradio-runtime/lib/thread/thread.cc
index 483dfed..44dbb37 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;
@@ -311,7 +317,12 @@ namespace gr {
CPU_SET(n, &set);
}
+#if !ANDROID
int ret = pthread_setaffinity_np(thread, len, &set);
+#else
+ int ret = 0;
+#endif
+
if(ret != 0) {
std::stringstream s;
s << "thread_unbind failed with error: " << ret << std::endl;
- [Commit-gnuradio] [gnuradio] branch android updated (ff27361 -> b7870d6), git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 12/12: analog: add ControlPort interfaces to frequency_modulator block., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 05/12: android: logger: adding Android log functions for different logging levels., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 07/12: android: runtime: issues related to vmcircbuf; only mmap_tmpfile version working currently., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 03/12: android: cmake: changed to using C checks for headers instead of C++., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 08/12: android: runtime: need to use a usable, writable location for android apps, so use the tmp path that we set up to point to the app's home directory., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 04/12: android: cmake: adding Boost deps used static builds; ordering in this patch is important., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 06/12: android: runtime: Android does not support pthread_setaffinity_np; turned this into a nop call.,
git <=
- [Commit-gnuradio] [gnuradio] 09/12: android: runtime: moved global block registry to a static get function., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 10/12: android: rutnime: better logging and cleanup, git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 11/12: cmake: cmake should get native thrift binary when cross compiling., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 01/12: android: fft: problems with wisdom files and MEASURE version of FFTW. Using a setting for the FFTW plan options if android or not., git, 2016/02/19
- [Commit-gnuradio] [gnuradio] 02/12: android: cmake: adding toolchain file for building., git, 2016/02/19