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:
Abseil Team 2017-12-15 11:12:12 -08:00 committed by Ashley Hedberg
parent 6280bddf55
commit 4972c72c5c
13 changed files with 70 additions and 21 deletions

View file

@ -83,11 +83,6 @@ void RegisterSpinLockProfiler(void (*fn)(const void *contendedlock,
submit_profile_data.Store(fn);
}
static inline bool IsCooperative(
base_internal::SchedulingMode scheduling_mode) {
return scheduling_mode == base_internal::SCHEDULE_COOPERATIVE_AND_KERNEL;
}
// Uncommon constructors.
SpinLock::SpinLock(base_internal::SchedulingMode mode)
: lockword_(IsCooperative(mode) ? kSpinLockCooperative : 0) {