[all-commits] [llvm/llvm-project] 564628: [libc++] Introduce an indirection to create thread...
Louis Dionne via All-commits
all-commits at lists.llvm.org
Fri Nov 27 08:56:57 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 564628014c404bf57aa7cd9a5337198046bdd1ed
https://github.com/llvm/llvm-project/commit/564628014c404bf57aa7cd9a5337198046bdd1ed
Author: Louis Dionne <ldionne.2 at gmail.com>
Date: 2020-11-27 (Fri, 27 Nov 2020)
Changed paths:
M libcxx/test/libcxx/utilities/memory/util.smartptr/race_condition.pass.cpp
M libcxx/test/std/atomics/atomics.types.operations/atomics.types.operations.wait/atomic_wait.pass.cpp
M libcxx/test/std/thread/futures/futures.promise/set_exception_at_thread_exit.pass.cpp
M libcxx/test/std/thread/futures/futures.promise/set_lvalue_at_thread_exit.pass.cpp
M libcxx/test/std/thread/futures/futures.promise/set_rvalue_at_thread_exit.pass.cpp
M libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_const.pass.cpp
M libcxx/test/std/thread/futures/futures.promise/set_value_at_thread_exit_void.pass.cpp
M libcxx/test/std/thread/futures/futures.shared_future/get.pass.cpp
M libcxx/test/std/thread/futures/futures.shared_future/wait.pass.cpp
M libcxx/test/std/thread/futures/futures.shared_future/wait_for.pass.cpp
M libcxx/test/std/thread/futures/futures.shared_future/wait_until.pass.cpp
M libcxx/test/std/thread/futures/futures.task/futures.task.members/dtor.pass.cpp
M libcxx/test/std/thread/futures/futures.task/futures.task.members/make_ready_at_thread_exit.pass.cpp
M libcxx/test/std/thread/futures/futures.task/futures.task.members/operator.pass.cpp
M libcxx/test/std/thread/futures/futures.unique_future/get.pass.cpp
M libcxx/test/std/thread/futures/futures.unique_future/wait.pass.cpp
M libcxx/test/std/thread/futures/futures.unique_future/wait_for.pass.cpp
M libcxx/test/std/thread/futures/futures.unique_future/wait_until.pass.cpp
M libcxx/test/std/thread/thread.barrier/arrive.pass.cpp
M libcxx/test/std/thread/thread.barrier/arrive_and_drop.pass.cpp
M libcxx/test/std/thread/thread.barrier/arrive_and_wait.pass.cpp
M libcxx/test/std/thread/thread.barrier/completion.pass.cpp
M libcxx/test/std/thread/thread.condition/notify_all_at_thread_exit.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/destructor.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_all.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/notify_one.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_for_pred.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_pred.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvar/wait_until_pred.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/destructor.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_all.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/notify_one.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_for_pred.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_pred.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_terminates.sh.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until.pass.cpp
M libcxx/test/std/thread/thread.condition/thread.condition.condvarany/wait_until_pred.pass.cpp
M libcxx/test/std/thread/thread.latch/arrive_and_wait.pass.cpp
M libcxx/test/std/thread/thread.latch/count_down.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_duration.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_time_point.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.cons/mutex_try_to_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_duration.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_time_point.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.cons/mutex_try_to_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.unique/thread.lock.unique.locking/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.class/try_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.mutex.requirements.mutex/thread.mutex.recursive/try_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/lock_shared.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.shared_mutex.requirements/thread.shared_mutex.class/try_lock_shared.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_for.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.class/try_lock_until.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_for.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.timedmutex.requirements/thread.timedmutex.recursive/try_lock_until.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/call_once.pass.cpp
M libcxx/test/std/thread/thread.mutex/thread.once/thread.once.callonce/race.pass.cpp
M libcxx/test/std/thread/thread.semaphore/acquire.pass.cpp
M libcxx/test/std/thread/thread.semaphore/binary.pass.cpp
M libcxx/test/std/thread/thread.semaphore/release.pass.cpp
M libcxx/test/std/thread/thread.semaphore/timed.pass.cpp
M libcxx/test/std/thread/thread.semaphore/try_acquire.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.algorithm/swap.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/copy.compile.fail.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.assign/move2.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/constr.compile.fail.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/copy.compile.fail.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.constr/move.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.destr/dtor.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/detach.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/get_id.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/join.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/joinable.pass.cpp
M libcxx/test/std/thread/thread.threads/thread.thread.class/thread.thread.member/swap.pass.cpp
A libcxx/test/support/make_test_thread.h
M libcxxabi/test/guard_threaded_test.pass.cpp
M libcxxabi/test/test_guard.pass.cpp
M libcxxabi/test/thread_local_destruction_order.pass.cpp
Log Message:
-----------
[libc++] Introduce an indirection to create threads in the test suite
We create threads using std::thread in various places in the test suite.
However, the usual std::thread constructor may not work on all platforms,
e.g. on platforms where passing a stack size is required to create a thread.
This commit introduces a simple indirection that makes it easier to tweak
how threads are created inside the test suite on various platforms. Note
that tests that are purposefully calling std::thread's constructor directly
(e.g. because that is what they're testing) were not modified.
More information about the All-commits
mailing list