Cleanup: Use Semaphore helper class in write()

- Use wrapper class, caller doesn't have to call cleanup.
- Use timedout semaphore in write_unlock().

Bug: 374232760
Test: stress test
Change-Id: If407d50918171e7ac63052e2234999d48554c9ca
Merged-In: If407d50918171e7ac63052e2234999d48554c9ca
1 file changed
tree: e26aebdc2d07c19497f996854bf8ce5bdbf65585
  1. aidl/
  2. extns/
  3. halimpl/
  4. Android.bp