summaryrefslogtreecommitdiff
path: root/rsContext.cpp
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2013-03-15 15:56:43 -0700
committerTim Murray <timmurray@google.com>2013-03-19 15:08:44 -0700
commit0b575de8ed0b628d84d256f5846500b0385979bd (patch)
tree255a20e02100f2c53cfaa05b29fb905b38aa6202 /rsContext.cpp
parent2487bb71ac56dea46ed382739c37f136e67b2062 (diff)
downloadrs-0b575de8ed0b628d84d256f5846500b0385979bd.tar.gz
Add x86 server support.
Change-Id: I674acaf15b67afa48bc736f72942a11e2e38e940
Diffstat (limited to 'rsContext.cpp')
-rw-r--r--rsContext.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/rsContext.cpp b/rsContext.cpp
index 8d972a2e..eec2dcd0 100644
--- a/rsContext.cpp
+++ b/rsContext.cpp
@@ -29,12 +29,21 @@
#include <sys/resource.h>
#include <sched.h>
-#include <cutils/properties.h>
-
#include <sys/syscall.h>
#include <string.h>
#include <dlfcn.h>
+#ifndef RS_SERVER
+#include <cutils/properties.h>
+#endif
+
+#ifdef RS_SERVER
+// Android exposes gettid(), standard Linux does not
+static pid_t gettid() {
+ return syscall(SYS_gettid);
+}
+#endif
+
using namespace android;
using namespace android::renderscript;
@@ -194,9 +203,13 @@ void Context::setupProgramStore() {
#endif
static uint32_t getProp(const char *str) {
+#ifndef RS_SERVER
char buf[PROPERTY_VALUE_MAX];
property_get(str, buf, "0");
return atoi(buf);
+#else
+ return 0;
+#endif
}
void Context::displayDebugStats() {