diff options
author | Yabin Cui <yabinc@google.com> | 2015-01-26 19:48:54 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-01-27 14:23:22 -0800 |
commit | 4a6e5a3b641dd99b658c4c336490371a3a5ae180 (patch) | |
tree | 3048f441498f5d5aed8bb218ecaca5e9a80cbf40 /libutils/misc.cpp | |
parent | fb538fb13d930a7398695d1044ceaaf854949018 (diff) | |
download | system_core-4a6e5a3b641dd99b658c4c336490371a3a5ae180.zip system_core-4a6e5a3b641dd99b658c4c336490371a3a5ae180.tar.gz system_core-4a6e5a3b641dd99b658c4c336490371a3a5ae180.tar.bz2 |
Kill HAVE_PTHREADS.
Bug: 19083585
Change-Id: Ic09eb3dd250bc5c5b63cac7998f99f5fa007f407
Diffstat (limited to 'libutils/misc.cpp')
-rw-r--r-- | libutils/misc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libutils/misc.cpp b/libutils/misc.cpp index 58eb499..ed1ba23 100644 --- a/libutils/misc.cpp +++ b/libutils/misc.cpp @@ -27,7 +27,7 @@ #include <errno.h> #include <stdio.h> -#if defined(HAVE_PTHREADS) +#if !defined(_WIN32) # include <pthread.h> #endif @@ -42,13 +42,13 @@ struct sysprop_change_callback_info { int priority; }; -#if defined(HAVE_PTHREADS) +#if !defined(_WIN32) static pthread_mutex_t gSyspropMutex = PTHREAD_MUTEX_INITIALIZER; static Vector<sysprop_change_callback_info>* gSyspropList = NULL; #endif void add_sysprop_change_callback(sysprop_change_callback cb, int priority) { -#if defined(HAVE_PTHREADS) +#if !defined(_WIN32) pthread_mutex_lock(&gSyspropMutex); if (gSyspropList == NULL) { gSyspropList = new Vector<sysprop_change_callback_info>(); @@ -72,7 +72,7 @@ void add_sysprop_change_callback(sysprop_change_callback cb, int priority) { } void report_sysprop_change() { -#if defined(HAVE_PTHREADS) +#if !defined(_WIN32) pthread_mutex_lock(&gSyspropMutex); Vector<sysprop_change_callback_info> listeners; if (gSyspropList != NULL) { |