Commit graph

15 commits

Author SHA1 Message Date
Elliott Hughes
d1c5c5baaa NDK: add availability comments to <sync.h>.
Bug: N/A
Test: N/A
Change-Id: I0cc16cc9c32c6679098aa875d5f81829215868d4
2018-07-27 15:13:33 -07:00
Ryan Prichard
d2fec76063 Restore the libsync __ANDROID_API__ guard
Partially reverts 2a358106b7

Bug: http://b/111668906
Test: m
Change-Id: Ic35091e10edda12a97992fbeffefda7ddf1305a1
2018-07-19 22:58:14 -07:00
Elliott Hughes
9d9c91acdc Merge "libsync: add __INTRODUCED_IN annotations." 2018-06-15 16:08:51 +00:00
Elliott Hughes
2a358106b7 libsync: add __INTRODUCED_IN annotations.
Bug: https://github.com/android-ndk/ndk/issues/706
Test: N/A
Change-Id: I8a4f98f2c929e28d81672d7e2e0d5dd63d27c7a6
2018-06-14 15:27:26 -07:00
Jesse Hall
82d377b585 sync: remove legacy sync info API
The legacy fence/pt info API has been deprecated for a while. This
change removes it from headers, so remaining users will have to switch
to the modern API when they're re-compiled. The functions are still
provided by libsync.so and tests remain, so existing binaries should
continue to work. Eventually these will be removed too, though, once
it's reasonable to expect those binaries to have been recompiled.

This reverts commit eed25df46a, which
reverted the previous attempt in commit
798ba95bda now that more users of the
legacy API have been converted.

Bug: 35326015
Test: make checkbuild
Test: adb shell dumpsys SurfaceFlinger --latency
2018-06-13 11:52:10 -07:00
Marissa Wall
eed25df46a Revert "sync: remove legacy sync info API"
This reverts commit 798ba95bda.

Brodcom uses the sync_fence_info_data directly.
https://android-build.googleplex.com/builds/submitted/4821789/elfin-userdebug/latest/view/logs/build_error.log

Change-Id: I72fed683397e9b10007b71253e20ded43726d377
2018-06-05 17:22:32 +00:00
Jesse Hall
798ba95bda sync: remove legacy sync info API
The legacy fence/pt info API has been deprecated for a while. This
change removes it from headers, so remaining users will have to switch
to the modern API when they're re-compiled. The functions are still
provided by libsync.so and tests remain, so existing binaries should
continue to work. Eventually these will be removed too, though, once
it's reasonable to expect those binaries to have been recompiled.

Bug: 35326015
Test: make checkbuild
Test: adb shell dumpsys SurfaceFlinger --latency
Change-Id: Id086fafe37c2bc1cfdca4a21107bc9208ed61f89
2018-05-23 16:45:48 -07:00
Dan Albert
55a76719e2 Add missing @addtogroup tags.
These NDK docs weren't in any groups, so they don't show up in the
new site.

Test: https://irina-dot-devsite.googleplex.com/ndk/reference/group/logging
Test: https://irina-dot-devsite.googleplex.com/ndk/reference/group/sync
Bug: http://b/77236573
Change-Id: I300f96585dec94359ecf96fbf39c6dc3ec4579e5
2018-04-13 14:49:41 -07:00
Alistair Strachan
5bebf84845 libsync: ndk: Fix compilation in C mode.
Use of 'inline' without 'static' may allow the C compiler to uninline it
within the compilation unit, depending on the C standard level. Always
using 'static inline' avoids this problem.

Test: build + boot to launcher
Change-Id: Ifb6e1fa6b84286067ddc2daca4c8942c410e56ab
2017-04-14 15:12:06 -07:00
Jesse Hall
41129a2526 sync: rename sync/sync.h to android/sync.h
Leave a temporary symlink from the old name to avoid having to change
all dependencies simultaneously.

Bug: 1901466
Test: m
Change-Id: Id210f0091457e52e1a6e048d241a723bdbe8779b
2017-02-23 18:44:50 -08:00
Jesse Hall
b7fdb2a128 sync: move declarations from sync/sync.h to sync.c
None of these should be needed or used outside of sync.c.

Test: lunch bullhead-eng ; m
Change-Id: I548a499d0e2ada2ab4987e63a8116327c3be0076
2017-02-23 18:44:50 -08:00
Jesse Hall
081806e5f2 sync: Add NDK sync.h and libsync
The new header provides an updated interface to libsync appropriate
for the NDK. Clients use existing syscalls where possible (e.g. poll()
instead of sync_wait()), and the remaining functions return structures
used in mainline Linux kernels rather than the Android staging sync
framework.

Over time, framework clients will be migrated to using the NDK
interface, which will eventually replace the current internal
interface. The only difference is the header will be named
<android/sync.h> in the NDK and <sync/sync.h> internally.

Bug: 35138793
Test: sync-unit-tests on bullhead
Change-Id: Ieb3649b80565393e26b604416158438d32c2a256
2017-02-23 18:44:50 -08:00
Gustavo Padovan
6786575d42 libsync: add new Sync kernel API
Add the new API to the internal sync.h file. As there is two different
APIs we will need to discovery dynamically which one to use.

v2: Fix Documentation

Test: Sync unit tests still passes.
Change-Id: I2ab3cd46e48ba5d9c73d54f9583b1a8141566581
2017-01-17 14:28:26 -08:00
Gustavo Padovan
d6bbc5de66 libsync: move kernel headers for sync ioctls to sync.h
This patch moves the legacy API to the internal sync.h header
and add documentation to it.

Test: Sync unit tests still passes.
Change-Id: I9b17eb23af30043b3df5fb9e857affad68ba8521
2017-01-17 14:28:00 -08:00
Rom Lemarchand
ddc20de148 move sync headers from include to libsync
Make sw_sync.h private

Change-Id: I0b120ebe81fd4a191b7aa4b6a8de4f64d16e2b3e
2014-01-03 21:27:05 +00:00