summaryrefslogtreecommitdiffstats
path: root/include/private
diff options
context:
space:
mode:
authorGlenn Kasten <gkasten@google.com>2013-06-24 12:06:46 -0700
committerGlenn Kasten <gkasten@google.com>2013-06-24 13:34:08 -0700
commit0d09a9bec07b3bec78bd473ff0bfcf0a261f3f25 (patch)
tree410d8c22e5d15f9143d04212cd96939c217cacc5 /include/private
parenta2cf13c77260f98fc674f103dcbd2bb2488a80ce (diff)
downloadframeworks_av-0d09a9bec07b3bec78bd473ff0bfcf0a261f3f25.zip
frameworks_av-0d09a9bec07b3bec78bd473ff0bfcf0a261f3f25.tar.gz
frameworks_av-0d09a9bec07b3bec78bd473ff0bfcf0a261f3f25.tar.bz2
Use mFutex as an event flag rather than semaphore
An event flag can be more fault-tolerant in case of loss of synchronization, as it cannot overflow. It also allows more bits to be used in the future. See http://en.wikipedia.org/wiki/Event_flag Change-Id: I01ca25d951eb263124da54bb4738f0d94ec4a48b
Diffstat (limited to 'include/private')
-rw-r--r--include/private/media/AudioTrackShared.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/private/media/AudioTrackShared.h b/include/private/media/AudioTrackShared.h
index 681f557..ef5bb8d 100644
--- a/include/private/media/AudioTrackShared.h
+++ b/include/private/media/AudioTrackShared.h
@@ -94,8 +94,9 @@ struct audio_track_cblk_t
// parameter
// renamed to "_" to detect incorrect use
- volatile int32_t mFutex; // semaphore: down (P) by client,
+ volatile int32_t mFutex; // event flag: down (P) by client,
// up (V) by server or binderDied() or interrupt()
+#define CBLK_FUTEX_WAKE 1 // if event flag bit is set, then a deferred wake is pending
private: