1 // Copyright 2018 The Fuchsia 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 
5 //
6 // Default weak implementation of integration routines appropriate for
7 // userspace. The kernel has its own versions of these symbols that
8 // override this implementation.
9 //
10 
11 #include <zircon/compiler.h>
12 
13 #include <lockdep/lockdep.h>
14 
15 namespace lockdep {
16 
17 // Default implementation of the runtime functions supporting the thread-local
18 // ThreadLockState. These MUST be overridden in environments that do not support
19 // the C++ thread_local TLS mechanism.
20 
SystemGetThreadLockState()21 __WEAK ThreadLockState* SystemGetThreadLockState() {
22     thread_local ThreadLockState thread_lock_state{};
23     return &thread_lock_state;
24 }
25 
SystemInitThreadLockState(ThreadLockState * state)26 __WEAK void SystemInitThreadLockState(ThreadLockState* state) {}
27 
28 } // namespace fbl
29