Inserting tuple into unordered_map relies on non standard libc++ extension:
http://stackoverflow.com/a/21313229
This change removes this dependency.
Test: sync-unit-tests (on hikey with SW_SYNC_USER built into kernel)
On mainline if the sw_sync timeline is destroyed the fences doesn't not
signal or error. So change the test to check if the fence is still there
by polling the fence with timeout zero and asserting if it is not
signalled.
Test: Sync unit tests still passes.
Change-Id: Icb8e629018eef35074ae91d0f29ed1f12e90492b
The mainline Sync File implementation doesn't have wait ioctl anymore.
Only poll is supported now, and we already have a test for that.
Test: Sync unit tests still passes.
Change-Id: Iadde7b2173024af9b8d20316e640297cf214c645
Change libsync functions in a way that it can run dynamically on both
APIs.
v2: fix whitespace changes and poll return handling
v3: handle error cases on sync_wait()
Test: Sync unit tests still passes.
Change-Id: I743ab92ce39cbfa75dca41dd0a435efa9f2aab66
hange-Id: Ib56f2c6441b41028bc9f66998676790b7713988a
sw_sync file for debug was moved to debugfs. Try to open it and if it
fails try to open /dev/sw_sync.
Test: Sync unit tests still passes.
Change-Id: Ie078fbc2eb5294f28b916a9e65b7fcd3a18a8580
hange-Id: I216874964368d939bed2779d98cd89e527a57d45
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
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
Update sync.c to include the structurs from sw_sync.h. This uapi
header has been deleted.
Test: Built mips/arm/arm64/x86/x86_64. Built and booted angler.
Change-Id: I2495cb17b35f697fb8a2a00f6633ccb53f78293f
The new uapi kernel headers added a new SEGV reason code, so
add it to the tombstone code.
Update sync.c to include the needed data structures itself. Someone
else will be fixing this to work on old versus new kernels.
Change-Id: Icb27713ea38a20003c7671a9bca262eebd96099b
See build/soong/README.md for more information.
I tested the following tests on a Nexus9 and linux host, and they
continued to pass:
/data/nativetest{,64}/bootstat_tests/bootstat_tests
out/host/linux-x86/bin/nativetest{,64}/bootstat_tests/bootstat_tests
/data/nativetest64/memunreachable_test/memunreachable_test
out/host/linux-x86/bin/nativetest{,64}/memunreachable_test/memunreachable_test
These continue to fail just like before this change:
/data/nativetest{,64}/sync_test/sync_test (was /system/bin/sync_test)
/data/nativetest{,64}/sync-unit-test/sync-unit-test
/data/nativetest/memunreachable_test/memunreachable_test
Test: See above
Change-Id: I691e564e0cf008dd363e3746223b153d712e024d
Also cleans up two instances of open() with useless mode params, and
changes a few uses of snprintf to use sizeof(buffer) instead of
hardcoded buffer sizes.
Change-Id: If11591003d910c995e72ad8f75afd072c255a3c5
Upstream modifications in K3.12 to the sw_sync driver set O_CLOEXEC on
the fd's returned by the SW_SYNC_IOC_CREATE_FENCE ioctl, therefore we
check the return of fcntl() for a non-negative value instead of strictly 0.
Change-Id: If4c82750fcc0aa3a57f243fa2a94691e3150e4a4
Not complete yet, but substantially more comprehensive than the
interactive test that was there before.
(cherry-picked from internal master, same change-id).
Change-Id: I9019b0a8babbc91f78aa850e0e288bbf05f93500
This change removes the #includes of "linux/*.h" headers from the libsync
header. It currently does this by copying the needed structs that are in the
linux headers. This is intended to be a temporary solution.
Change-Id: Ie7e1a8e05fcf8809ba4aa0e2427efe141dae5327
Used to talk to kernel synchronization framework
Change-Id: I66e1f4a90f5d58d384bf1cec09db52101f182c5e
Signed-off-by: Erik Gilling <konkers@android.com>