summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYabin Cui <yabinc@google.com>2015-01-27 19:46:54 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2015-01-27 19:46:54 +0000
commit6e32c0377db89bafa477715b3a02431d651978cf (patch)
tree9ea26100616867e476c932a52ea63025e982185a
parenta46ff664571465b7a2741bed4225d30b5bf07503 (diff)
parent8fb2d25ff3e9ade7c03ebe52a89c671ee75ce484 (diff)
downloadframeworks_native-6e32c0377db89bafa477715b3a02431d651978cf.zip
frameworks_native-6e32c0377db89bafa477715b3a02431d651978cf.tar.gz
frameworks_native-6e32c0377db89bafa477715b3a02431d651978cf.tar.bz2
Merge "Kill HAVE_PTHREADS."
-rw-r--r--libs/binder/IPCThreadState.cpp15
-rw-r--r--services/surfaceflinger/main_surfaceflinger.cpp5
2 files changed, 5 insertions, 15 deletions
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
index 2043d54..9f68aa8 100644
--- a/libs/binder/IPCThreadState.cpp
+++ b/libs/binder/IPCThreadState.cpp
@@ -29,21 +29,14 @@
#include <private/binder/binder_module.h>
#include <private/binder/Static.h>
-#include <sys/ioctl.h>
-#include <signal.h>
#include <errno.h>
-#include <stdio.h>
-#include <unistd.h>
-
-#ifdef HAVE_PTHREADS
#include <pthread.h>
#include <sched.h>
+#include <signal.h>
+#include <stdio.h>
+#include <sys/ioctl.h>
#include <sys/resource.h>
-#endif
-#ifdef HAVE_WIN32_THREADS
-#include <windows.h>
-#endif
-
+#include <unistd.h>
#if LOG_NDEBUG
diff --git a/services/surfaceflinger/main_surfaceflinger.cpp b/services/surfaceflinger/main_surfaceflinger.cpp
index 90e3f7d..a74bc4c 100644
--- a/services/surfaceflinger/main_surfaceflinger.cpp
+++ b/services/surfaceflinger/main_surfaceflinger.cpp
@@ -14,9 +14,7 @@
* limitations under the License.
*/
-#if defined(HAVE_PTHREADS)
#include <sys/resource.h>
-#endif
#include <cutils/sched_policy.h>
#include <binder/IServiceManager.h>
@@ -39,9 +37,8 @@ int main(int, char**) {
// instantiate surfaceflinger
sp<SurfaceFlinger> flinger = new SurfaceFlinger();
-#if defined(HAVE_PTHREADS)
setpriority(PRIO_PROCESS, 0, PRIORITY_URGENT_DISPLAY);
-#endif
+
set_sched_policy(0, SP_FOREGROUND);
// initialize before clients can connect