tracing_tls.cc 505 B

12345678910111213141516171819
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/tracing/tracing_tls.h"
  5. #include "base/no_destructor.h"
  6. namespace base {
  7. namespace tracing {
  8. // static
  9. ThreadLocalBoolean* GetThreadIsInTraceEventTLS() {
  10. static base::NoDestructor<base::ThreadLocalBoolean> thread_is_in_trace_event;
  11. return thread_is_in_trace_event.get();
  12. }
  13. } // namespace tracing
  14. } // namespace base