diff options
author | Elliott Hughes <enh@google.com> | 2015-07-30 16:50:15 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2015-07-30 16:50:15 +0000 |
commit | 145afc2cc4f973a4ad63aeabe5b0f633c8e99cec (patch) | |
tree | 43391eef0509bc8627b09a5b11326ff3c043fac1 /include/utils | |
parent | c6dbc85845e58464541bb0644ebd570c44841a4c (diff) | |
parent | fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f (diff) |
am fb1ecbc5: am e6e71608: Merge "Use __ANDROID__ instead of HAVE_ANDROID_OS."
* commit 'fb1ecbc55e7edeafb138eb2a60ca89ba9a7b1f0f':
Use __ANDROID__ instead of HAVE_ANDROID_OS.
Diffstat (limited to 'include/utils')
-rw-r--r-- | include/utils/AndroidThreads.h | 2 | ||||
-rw-r--r-- | include/utils/Mutex.h | 4 | ||||
-rw-r--r-- | include/utils/Thread.h | 4 | ||||
-rw-r--r-- | include/utils/Trace.h | 6 |
4 files changed, 8 insertions, 8 deletions
diff --git a/include/utils/AndroidThreads.h b/include/utils/AndroidThreads.h index aad1e82cb..4c2dd49f6 100644 --- a/include/utils/AndroidThreads.h +++ b/include/utils/AndroidThreads.h @@ -73,7 +73,7 @@ extern void androidSetCreateThreadFunc(android_create_thread_fn func); // ------------------------------------------------------------------ // Extra functions working with raw pids. -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) // Change the priority AND scheduling group of a particular thread. The priority // should be one of the ANDROID_PRIORITY constants. Returns INVALID_OPERATION // if the priority set failed, else another value if just the group set failed; diff --git a/include/utils/Mutex.h b/include/utils/Mutex.h index 757519b08..f027c799f 100644 --- a/include/utils/Mutex.h +++ b/include/utils/Mutex.h @@ -59,7 +59,7 @@ public: // lock if possible; returns 0 on success, error otherwise status_t tryLock(); -#if HAVE_ANDROID_OS +#if defined(__ANDROID__) // lock the mutex, but don't wait longer than timeoutMilliseconds. // Returns 0 on success, TIMED_OUT for failure due to timeout expiration. // @@ -128,7 +128,7 @@ inline void Mutex::unlock() { inline status_t Mutex::tryLock() { return -pthread_mutex_trylock(&mMutex); } -#if HAVE_ANDROID_OS +#if defined(__ANDROID__) inline status_t Mutex::timedLock(nsecs_t timeoutNs) { const struct timespec ts = { /* .tv_sec = */ static_cast<time_t>(timeoutNs / 1000000000), diff --git a/include/utils/Thread.h b/include/utils/Thread.h index 28839fded..1532b7e0c 100644 --- a/include/utils/Thread.h +++ b/include/utils/Thread.h @@ -70,7 +70,7 @@ public: // Indicates whether this thread is running or not. bool isRunning() const; -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) // Return the thread's kernel ID, same as the thread itself calling gettid(), // or -1 if the thread is not running. pid_t getTid() const; @@ -101,7 +101,7 @@ private: volatile bool mExitPending; volatile bool mRunning; sp<Thread> mHoldSelf; -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) // legacy for debugging, not used by getTid() as it is set by the child thread // and so is not initialized until the child reaches that point pid_t mTid; diff --git a/include/utils/Trace.h b/include/utils/Trace.h index 6ee343d79..6ba68f61c 100644 --- a/include/utils/Trace.h +++ b/include/utils/Trace.h @@ -17,7 +17,7 @@ #ifndef ANDROID_TRACE_H #define ANDROID_TRACE_H -#ifdef HAVE_ANDROID_OS +#if defined(__ANDROID__) #include <fcntl.h> #include <stdint.h> @@ -59,11 +59,11 @@ private: }; // namespace android -#else // HAVE_ANDROID_OS +#else // !__ANDROID__ #define ATRACE_NAME(...) #define ATRACE_CALL() -#endif // HAVE_ANDROID_OS +#endif // __ANDROID__ #endif // ANDROID_TRACE_H |