1fe6060f1SDimitry Andric //===-- dfsan_chained_origin_depot.cpp ------------------------------------===//
2fe6060f1SDimitry Andric //
3fe6060f1SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4fe6060f1SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
5fe6060f1SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6fe6060f1SDimitry Andric //
7fe6060f1SDimitry Andric //===----------------------------------------------------------------------===//
8fe6060f1SDimitry Andric //
9fe6060f1SDimitry Andric // This file is a part of DataFlowSanitizer.
10fe6060f1SDimitry Andric //
11fe6060f1SDimitry Andric // A storage for chained origins.
12fe6060f1SDimitry Andric //===----------------------------------------------------------------------===//
13fe6060f1SDimitry Andric 
14fe6060f1SDimitry Andric #include "dfsan_chained_origin_depot.h"
15fe6060f1SDimitry Andric 
16fe6060f1SDimitry Andric namespace __dfsan {
17fe6060f1SDimitry Andric 
18fe6060f1SDimitry Andric static ChainedOriginDepot chainedOriginDepot;
19fe6060f1SDimitry Andric 
GetChainedOriginDepot()20fe6060f1SDimitry Andric ChainedOriginDepot* GetChainedOriginDepot() { return &chainedOriginDepot; }
21fe6060f1SDimitry Andric 
ChainedOriginDepotLockBeforeFork()22*cb14a3feSDimitry Andric void ChainedOriginDepotLockBeforeFork() { chainedOriginDepot.LockBeforeFork(); }
23*cb14a3feSDimitry Andric 
ChainedOriginDepotUnlockAfterFork(bool fork_child)24*cb14a3feSDimitry Andric void ChainedOriginDepotUnlockAfterFork(bool fork_child) {
25*cb14a3feSDimitry Andric   chainedOriginDepot.UnlockAfterFork(fork_child);
26*cb14a3feSDimitry Andric }
27*cb14a3feSDimitry Andric 
28fe6060f1SDimitry Andric }  // namespace __dfsan
29