diff options
author | Tom Cherry <tomcherry@google.com> | 2018-02-20 15:40:02 -0800 |
---|---|---|
committer | Tom Cherry <tomcherry@google.com> | 2018-02-20 15:40:02 -0800 |
commit | 60ddedff0b34f0058780b8cdbdeacef667526d08 (patch) | |
tree | 7e301fc90ef9aa777f18bb29441c4554591f2386 | |
parent | d5172fced0f88114e21086db5defaee64371de32 (diff) | |
download | bionic-60ddedff0b34f0058780b8cdbdeacef667526d08.tar.gz |
Build bionic/tests with cpp_std experimental.
Test: bionic unit tests still pass.
Change-Id: I1ff5c0fa391ae111ac19e863ef0f7f29868406e6
-rw-r--r-- | tests/Android.bp | 1 | ||||
-rw-r--r-- | tests/pthread_test.cpp | 12 |
2 files changed, 7 insertions, 6 deletions
diff --git a/tests/Android.bp b/tests/Android.bp index 5483b6a7d..ec90296c6 100644 --- a/tests/Android.bp +++ b/tests/Android.bp @@ -17,6 +17,7 @@ cc_defaults { name: "bionic_tests_defaults", host_supported: true, + cpp_std: "experimental", target: { darwin: { enabled: false, diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp index 5e55415ce..dd7879cc2 100644 --- a/tests/pthread_test.cpp +++ b/tests/pthread_test.cpp @@ -914,7 +914,7 @@ static void test_pthread_rwlock_reader_wakeup_writer(std::function<int (pthread_ ASSERT_EQ(0, pthread_rwlock_rdlock(&wakeup_arg.lock)); wakeup_arg.progress = RwlockWakeupHelperArg::LOCK_INITIALIZED; wakeup_arg.tid = 0; - wakeup_arg.trylock_function = pthread_rwlock_trywrlock; + wakeup_arg.trylock_function = &pthread_rwlock_trywrlock; wakeup_arg.lock_function = lock_function; pthread_t thread; @@ -950,7 +950,7 @@ static void test_pthread_rwlock_writer_wakeup_reader(std::function<int (pthread_ ASSERT_EQ(0, pthread_rwlock_wrlock(&wakeup_arg.lock)); wakeup_arg.progress = RwlockWakeupHelperArg::LOCK_INITIALIZED; wakeup_arg.tid = 0; - wakeup_arg.trylock_function = pthread_rwlock_tryrdlock; + wakeup_arg.trylock_function = &pthread_rwlock_tryrdlock; wakeup_arg.lock_function = lock_function; pthread_t thread; @@ -1010,8 +1010,8 @@ TEST(pthread, pthread_rwlock_timedrdlock_timeout) { ASSERT_EQ(0, pthread_rwlock_wrlock(&wakeup_arg.lock)); wakeup_arg.progress = RwlockWakeupHelperArg::LOCK_INITIALIZED; wakeup_arg.tid = 0; - wakeup_arg.trylock_function = pthread_rwlock_tryrdlock; - wakeup_arg.timed_lock_function = pthread_rwlock_timedrdlock; + wakeup_arg.trylock_function = &pthread_rwlock_tryrdlock; + wakeup_arg.timed_lock_function = &pthread_rwlock_timedrdlock; pthread_t thread; ASSERT_EQ(0, pthread_create(&thread, nullptr, @@ -1031,8 +1031,8 @@ TEST(pthread, pthread_rwlock_timedwrlock_timeout) { ASSERT_EQ(0, pthread_rwlock_rdlock(&wakeup_arg.lock)); wakeup_arg.progress = RwlockWakeupHelperArg::LOCK_INITIALIZED; wakeup_arg.tid = 0; - wakeup_arg.trylock_function = pthread_rwlock_trywrlock; - wakeup_arg.timed_lock_function = pthread_rwlock_timedwrlock; + wakeup_arg.trylock_function = &pthread_rwlock_trywrlock; + wakeup_arg.timed_lock_function = &pthread_rwlock_timedwrlock; pthread_t thread; ASSERT_EQ(0, pthread_create(&thread, nullptr, |