Enumerations
enum SchedulingMode
| Name | Value | Comments |
|---|---|---|
| SCHEDULE_KERNEL_ONLY | 0 |
Allow scheduling only the host OS. |
| SCHEDULE_COOPERATIVE_AND_KERNEL | 1 |
Also allow cooperative scheduling. |
Used to describe how a thread may be scheduled. Typically associated with
the declaration of a resource supporting synchronized access.
SCHEDULE_COOPERATIVE_AND_KERNEL:
Specifies that when waiting, a cooperative thread (e.g. a Fiber) may
reschedule (using base::scheduling semantics); allowing other cooperative
threads to proceed.
SCHEDULE_KERNEL_ONLY: (Also described as "non-cooperative")
Specifies that no cooperative scheduling semantics may be used, even if the
current thread is itself cooperatively scheduled. This means that
cooperative threads will NOT allow other cooperative threads to execute in
their place while waiting for a resource of this type. Host operating system
semantics (e.g. a futex) may still be used.
When optional, clients should strongly prefer SCHEDULE_COOPERATIVE_AND_KERNEL
by default. SCHEDULE_KERNEL_ONLY should only be used for resources on which
base::scheduling (e.g. the implementation of a Scheduler) may depend.
NOTE: Cooperative resources may not be nested below non-cooperative ones.
This means that it is invalid to to acquire a SCHEDULE_COOPERATIVE_AND_KERNEL
resource if a SCHEDULE_KERNEL_ONLY resource is already held.
Defined at line 49 of file ../../third_party/abseil-cpp/src/absl/base/internal/scheduling_mode.h
Records
-
class AtomicHook -
class AtomicHook<ReturnType (*)(Args...)> -
class ErrnoSaver -
class IteratorCategory -
class IteratorCategory<Iterator, std::void_t<typename std::iterator_traits<Iterator>::iterator_category>> -
class IteratorConceptImpl -
class IteratorConceptImpl<Iterator, std::void_t<typename std::iterator_traits<Iterator>::iterator_concept>> -
class PerThreadSynch -
class SchedulingGuard -
class SchedulingHelper -
class ScopedSetAbslHardeningForTesting -
class SpinLock -
class SpinLockWaitTransition -
class ThreadIdentity
Functions
-
uint16_t UnalignedLoad16 (const void * _Nonnull p)Defined at line 39 of file ../../third_party/abseil-cpp/src/absl/base/internal/unaligned_access.h
-
uint32_t UnalignedLoad32 (const void * _Nonnull p)Defined at line 45 of file ../../third_party/abseil-cpp/src/absl/base/internal/unaligned_access.h
-
void HardeningAssert (bool cond)`HardeningAssert` performs runtime checks when Abseil Hardening is enabled,
even if `NDEBUG` is defined.
When `NDEBUG` is not defined, `HardeningAssert`'s behavior is identical to
`ABSL_ASSERT`.
Prefer a more specific assertion function over this more general one,
as assertion functions which perform the comparison themselves
can have the cost of the comparison attributed to them.
Defined at line 48 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
uint64_t UnalignedLoad64 (const void * _Nonnull p)Defined at line 51 of file ../../third_party/abseil-cpp/src/absl/base/internal/unaligned_access.h
-
void UnalignedStore16 (void * _Nonnull p, uint16_t v)Defined at line 57 of file ../../third_party/abseil-cpp/src/absl/base/internal/unaligned_access.h
-
void UnalignedStore32 (void * _Nonnull p, uint32_t v)Defined at line 61 of file ../../third_party/abseil-cpp/src/absl/base/internal/unaligned_access.h
-
void HardeningAssertSlow (bool cond)`HardeningAssertSlow` is used to perform runtime checks which are too
computationally expensive to enable widely by default.
When `NDEBUG` is not defined, `HardeningAssertSlow`'s behavior is identical
to `ABSL_ASSERT`.
Defined at line 62 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
void SetAbslHardeningEnabled (bool enabled) -
uint32_t SpinLockWait (std::atomic<uint32_t> *w,intn,const SpinLockWaitTransition[]trans,SchedulingModescheduling_mode)Wait until *w can transition from trans[i].from to trans[i].to for some i
satisfying 0
<
=i
<n
&
&
trans[i].done, atomically make the transition,
then return the old value of *w. Make any other atomic transitions
where !trans[i].done, but continue waiting.
Wakeups for threads blocked on SpinLockWait do not respect priorities.
-
void UnalignedStore64 (void * _Nonnull p, uint64_t v)Defined at line 65 of file ../../third_party/abseil-cpp/src/absl/base/internal/unaligned_access.h
-
template <typename T1, typename T2>void HardeningAssertGT (T1 val1, T2 val2)Defined at line 72 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
template <typename T1, typename T2>void HardeningAssertGE (T1 val1, T2 val2)Defined at line 82 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
void SpinLockWake (std::atomic<uint32_t> * w, bool all)If possible, wake some thread that has called SpinLockDelay(w, ...). If `all`
is true, wake all such threads. On some systems, this may be a no-op; on
those systems, threads calling SpinLockDelay() will always wake eventually
even if SpinLockWake() is never called.
Defined at line 83 of file ../../third_party/abseil-cpp/src/absl/base/internal/spinlock_wait.h
-
template <typename T1, typename T2>void HardeningAssertLT (T1 val1, T2 val2)Defined at line 92 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
template <typename T1, typename T2>void HardeningAssertLE (T1 val1, T2 val2)Defined at line 102 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
void HardeningAssertInBounds (size_t index, size_t size)Defined at line 111 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
template <typename T>void HardeningAssertNonEmpty (const T & container)Defined at line 116 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
template <typename T>void HardeningAssertNonNull (T ptr)Defined at line 126 of file ../../third_party/abseil-cpp/src/absl/base/internal/hardening.h
-
std::atomic<uint32_t> * _Nonnull ControlWord (absl::once_flag * _Nonnull flag)Defined at line 194 of file ../../third_party/abseil-cpp/src/absl/base/call_once.h
-
void SpinLockDelay (std::atomic<uint32_t> *w,uint32_tvalue,intloop,base_internal::SchedulingModescheduling_mode)Wait for an appropriate spin delay on iteration "loop" of a
spin loop on location *w, whose previously observed value was "value".
SpinLockDelay() may do nothing, may yield the CPU, may sleep a clock tick,
or may wait for a call to SpinLockWake(w).
Defined at line 88 of file ../../third_party/abseil-cpp/src/absl/base/internal/spinlock_wait.h
-
int SpinLockSuggestedDelayNS (int loop)Helper used by AbslInternalSpinLockDelay.
Returns a suggested delay in nanoseconds for iteration number "loop".
-
template <typename Callable, typename... Args>void LowLevelCallOnce (absl::once_flag * _Nonnullflag,Callable &&fn,Args &&...args)Like call_once, but uses KERNEL_ONLY scheduling. Intended to be used to
initialize entities used by the scheduler implementation.
Defined at line 200 of file ../../third_party/abseil-cpp/src/absl/base/call_once.h
-
void BadDownCastCrash (const char * source_type, const char * target_type) -
template <typename Callable, typename... Args>void CallOnceImpl (std::atomic<uint32_t> * _Nonnullcontrol,base_internal::SchedulingModescheduling_mode,Callable &&fn,Args &&...args)Defined at line 152 of file ../../third_party/abseil-cpp/src/absl/base/call_once.h
-
ThreadIdentity * CurrentThreadIdentityIfPresent ()Returns the ThreadIdentity object representing the calling thread; guaranteed
to be unique for its lifetime. The returned object will remain valid for the
program's lifetime; although it may be re-assigned to a subsequent thread.
If one does not exist, return nullptr instead.
Does not malloc(*), and is async-signal safe.
[*] Technically pthread_setspecific() does malloc on first use; however this
is handled internally within tcmalloc's initialization already. Note that
darwin does *not* use tcmalloc, so this can catch you if using MallocHooks
on Apple platforms. Whatever function is calling your MallocHooks will need
to watch for recursion on Apple platforms.
New ThreadIdentity objects can be constructed and associated with a thread
by calling GetOrCreateCurrentThreadIdentity() in per-thread-sem.h.
-
void HardeningAbort ()Defined at line 62 of file ../../third_party/abseil-cpp/src/absl/base/macros.h
-
void SetCurrentThreadIdentity (ThreadIdentity * identity, ThreadIdentityReclaimerFunction reclaimer)Sets the current thread identity to the given value. 'reclaimer' is a
pointer to the global function for cleaning up instances on thread
destruction.
-
void ClearCurrentThreadIdentity ()Removes the currently associated ThreadIdentity from the running thread.
This must be called from inside the ThreadIdentityReclaimerFunction, and only
from that function.
-
template <typename To, typename From>void ValidateDownCast (From * f)Defined at line 209 of file ../../third_party/abseil-cpp/src/absl/base/casts.h
-
template <typename T>const T & ts_unchecked_read (const T & v)Takes a reference to a guarded data member, and returns an unguarded
reference.
Do not use this function directly, use ABSL_TS_UNCHECKED_READ instead.
Defined at line 320 of file ../../third_party/abseil-cpp/src/absl/base/thread_annotations.h
-
template <typename T>T & ts_unchecked_read (T & v)Defined at line 325 of file ../../third_party/abseil-cpp/src/absl/base/thread_annotations.h
-
template <typename T>T AnnotateUnprotectedRead (const volatile T & x)Defined at line 405 of file ../../third_party/abseil-cpp/src/absl/base/dynamic_annotations.h