mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
26 lines
697 B
C
26 lines
697 B
C
// Copyright 2016 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef FLUTTER_SYNCHRONIZATION_DEBUG_THREAD_CHECKER_H_
|
|
#define FLUTTER_SYNCHRONIZATION_DEBUG_THREAD_CHECKER_H_
|
|
|
|
#ifndef NDEBUG
|
|
|
|
#include <pthread.h>
|
|
#include "lib/ftl/synchronization/thread_checker.h"
|
|
|
|
#define FLUTTER_THREAD_CHECKER_DECLARE(x) ::ftl::ThreadChecker x;
|
|
|
|
#define FLUTTER_THREAD_CHECKER_CHECK(x) FTL_CHECK(x.IsCreationThreadCurrent());
|
|
|
|
#else // NDEBUG
|
|
|
|
#define FLUTTER_THREAD_CHECKER_DECLARE(x)
|
|
|
|
#define FLUTTER_THREAD_CHECKER_CHECK(x)
|
|
|
|
#endif // NDEBUG
|
|
|
|
#endif // FLUTTER_SYNCHRONIZATION_DEBUG_THREAD_CHECKER_H_
|