Changes imported from Abseil "staging" branch:
- f59c2332341d6b1a3e045d61eb0065f7a226f807 Avoid preprocessing '__CUDACC_VER__ >= 70000' on CUDA 9,... by Abseil Team <absl-team@google.com> - 12dd22cf967603e9a12d58abfe877989d61844e3 Internal change. by Greg Falcon <gfalcon@google.com> GitOrigin-RevId: f59c2332341d6b1a3e045d61eb0065f7a226f807 Change-Id: If4f5274e6d638a2ac86f1377e6ac0481dc584f19
This commit is contained in:
parent
6280bddf55
commit
4972c72c5c
13 changed files with 70 additions and 21 deletions
|
|
@ -151,6 +151,12 @@ class LOCKABLE SpinLock {
|
|||
enum { kWaitTimeMask = // Includes kSpinLockSleeper.
|
||||
~(kSpinLockHeld | kSpinLockCooperative | kSpinLockDisabledScheduling) };
|
||||
|
||||
// Returns true if the provided scheduling mode is cooperative.
|
||||
static constexpr bool IsCooperative(
|
||||
base_internal::SchedulingMode scheduling_mode) {
|
||||
return scheduling_mode == base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL;
|
||||
}
|
||||
|
||||
uint32_t TryLockInternal(uint32_t lock_value, uint32_t wait_cycles);
|
||||
void InitLinkerInitializedAndCooperative();
|
||||
void SlowLock() ABSL_ATTRIBUTE_COLD;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue