summaryrefslogtreecommitdiff
path: root/Kernel/Locking/LockRank.cpp
blob: 62efe7400db389b1b318cfacc10381180073909c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*
 * Copyright (c) 2021, Brian Gianforcaro <bgianf@serenityos.org>
 *
 * SPDX-License-Identifier: BSD-2-Clause
 */

#include <Kernel/Locking/LockRank.h>
#include <Kernel/Thread.h>

// Note: These stubs can't be in LockRank.h as that would create
// a cyclic dependency in the header include graph of the Kernel.

namespace Kernel {

void track_lock_acquire(LockRank rank)
{
    auto thread = Thread::current();
    if (thread && !thread->is_crashing())
        thread->track_lock_acquire(rank);
}

void track_lock_release(LockRank rank)
{
    auto thread = Thread::current();
    if (thread && !thread->is_crashing())
        thread->track_lock_release(rank);
}

}