OSDN Git Service

fifo: isolate atomic and futex operations
authorGlenn Kasten <gkasten@google.com>
Fri, 2 Dec 2016 00:12:59 +0000 (16:12 -0800)
committerGlenn Kasten <gkasten@google.com>
Fri, 2 Dec 2016 00:38:05 +0000 (16:38 -0800)
commit7cc8f545385d09aaa0c6e081856d7e3c8e500133
tree4f7452f088725b696ddadd6a705be8a09461675e
parentbe9f4d88b19a052f4fbafcee3a1f05ff6fdbb6ad
fifo: isolate atomic and futex operations

Now all atomic and futex operations occur in fifo_index.cpp.
This implements these TODOs:
 - Abstract out atomic operations to audio_utils_fifo_index
 - Replace friend by setter and getter, and abstract the futex
This is one of a series of CLs to isolate the dependencies.

Test: builds OK on Android, host Linux, and host macOS
Change-Id: Ic4ec46d472c583dce8525f11ed8cb1db89928d30
audio_utils/Android.bp
audio_utils/fifo.cpp
audio_utils/fifo_index.cpp [new file with mode: 0644]
audio_utils/include/audio_utils/fifo.h
audio_utils/include/audio_utils/fifo_index.h [new file with mode: 0644]