summaryrefslogtreecommitdiffstats
path: root/include/utils
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2011-06-23 12:55:29 -0700
committerGlenn Kasten <gkasten@google.com>2011-06-23 12:55:29 -0700
commit58e012d1e37e1272d43c9ff0f56c9b236dd1d7f1 (patch)
tree2c690746cbb3c4129ae9b5d4794b414effbd4037 /include/utils
parent6eb0e6526c9fea3accfbd3a4c6ae3eb7277d578f (diff)
downloadframeworks_native-58e012d1e37e1272d43c9ff0f56c9b236dd1d7f1.zip
frameworks_native-58e012d1e37e1272d43c9ff0f56c9b236dd1d7f1.tar.gz
frameworks_native-58e012d1e37e1272d43c9ff0f56c9b236dd1d7f1.tar.bz2
Add Thread::join
This new API will be used by applications that previously used the lower-level pthread APIs (including pthread_join). Centralizing on the Thread class instead of pthread will permit additional functionality to be added later in only one location. Change-Id: I8460169ac9c61ac9f85752405ed54c94651058d7
Diffstat (limited to 'include/utils')
-rw-r--r--include/utils/threads.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/utils/threads.h b/include/utils/threads.h
index 0bd69cf..432805e 100644
--- a/include/utils/threads.h
+++ b/include/utils/threads.h
@@ -510,6 +510,10 @@ public:
// that case.
status_t requestExitAndWait();
+ // Wait until this object's thread exits. Returns immediately if not yet running.
+ // Do not call from this object's thread; will return WOULD_BLOCK in that case.
+ status_t join();
+
protected:
// exitPending() returns true if requestExit() has been called.
bool exitPending() const;