Remove uses of ATOMIC_VAR_INIT
ATOMIC_VAR_INIT has a trivial definition `#define ATOMIC_VAR_INIT(value) (value)`, is deprecated in C17/C++20, and will be removed in newer standards in newer GCC/Clang (e.g. https://reviews.llvm.org/D144196). PiperOrigin-RevId: 525534393
This commit is contained in:
parent
5bd3282515
commit
476c7efc18
|
@ -310,7 +310,7 @@ class Scheduler {
|
||||||
absl::Mutex state_mutex_;
|
absl::Mutex state_mutex_;
|
||||||
|
|
||||||
// Current state of the scheduler.
|
// Current state of the scheduler.
|
||||||
std::atomic<State> state_ = ATOMIC_VAR_INIT(STATE_NOT_STARTED);
|
std::atomic<State> state_ = STATE_NOT_STARTED;
|
||||||
|
|
||||||
// True if all graph input streams are closed.
|
// True if all graph input streams are closed.
|
||||||
bool graph_input_streams_closed_ ABSL_GUARDED_BY(state_mutex_) = false;
|
bool graph_input_streams_closed_ ABSL_GUARDED_BY(state_mutex_) = false;
|
||||||
|
|
|
@ -454,8 +454,8 @@ class GlContext : public std::enable_shared_from_this<GlContext> {
|
||||||
// Number of glFinish calls completed on the GL thread.
|
// Number of glFinish calls completed on the GL thread.
|
||||||
// Changes should be guarded by mutex_. However, we use simple atomic
|
// Changes should be guarded by mutex_. However, we use simple atomic
|
||||||
// loads for efficiency on the fast path.
|
// loads for efficiency on the fast path.
|
||||||
std::atomic<int64_t> gl_finish_count_ = ATOMIC_VAR_INIT(0);
|
std::atomic<int64_t> gl_finish_count_ = 0;
|
||||||
std::atomic<int64_t> gl_finish_count_target_ = ATOMIC_VAR_INIT(0);
|
std::atomic<int64_t> gl_finish_count_target_ = 0;
|
||||||
|
|
||||||
GlContext* context_waiting_on_ ABSL_GUARDED_BY(mutex_) = nullptr;
|
GlContext* context_waiting_on_ ABSL_GUARDED_BY(mutex_) = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user