class SchedulingGuard

Defined at line 63 of file ../../third_party/abseil-cpp/src/absl/base/internal/low_level_scheduling.h

SchedulingGuard

Provides guard semantics that may be used to disable cooperative rescheduling

of the calling thread within specific program blocks. This is used to

protect resources (e.g. low-level SpinLocks or Domain code) that cooperative

scheduling depends on.

Domain implementations capable of rescheduling in reaction to involuntary

kernel thread actions (e.g blocking due to a pagefault or syscall) must

guarantee that an annotated thread is not allowed to (cooperatively)

reschedule until the annotated region is complete.

It is an error to attempt to use a cooperatively scheduled resource (e.g.

Mutex) within a rescheduling-disabled region.

All methods are async-signal safe.

Public Methods

void SchedulingGuard (const SchedulingGuard & )

Defined at line 67 of file ../../third_party/abseil-cpp/src/absl/base/internal/low_level_scheduling.h

SchedulingGuard & operator= (const SchedulingGuard & )

Defined at line 68 of file ../../third_party/abseil-cpp/src/absl/base/internal/low_level_scheduling.h

bool ReschedulingIsAllowed ()

Returns true iff the calling thread may be cooperatively rescheduled.

Defined at line 107 of file ../../third_party/abseil-cpp/src/absl/base/internal/low_level_scheduling.h

bool DisableRescheduling ()

Disable cooperative rescheduling of the calling thread. It may still

initiate scheduling operations (e.g. wake-ups), however, it may not itself

reschedule. Nestable. The returned result is opaque, clients should not

attempt to interpret it.

REQUIRES: Result must be passed to a pairing EnableScheduling().

Defined at line 126 of file ../../third_party/abseil-cpp/src/absl/base/internal/low_level_scheduling.h

void EnableRescheduling (bool disable_result)

Marks the end of a rescheduling disabled region, previously started by

DisableRescheduling().

REQUIRES: Pairs with innermost call (and result) of DisableRescheduling().

Defined at line 143 of file ../../third_party/abseil-cpp/src/absl/base/internal/low_level_scheduling.h

Records