1 #ifndef _G_TRACEABLE_NVOC_H_
2 #define _G_TRACEABLE_NVOC_H_
3 #include "nvoc/runtime.h"
4 
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8 
9 /*
10  * SPDX-FileCopyrightText: Copyright (c) 2011-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
11  * SPDX-License-Identifier: MIT
12  *
13  * Permission is hereby granted, free of charge, to any person obtaining a
14  * copy of this software and associated documentation files (the "Software"),
15  * to deal in the Software without restriction, including without limitation
16  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
17  * and/or sell copies of the Software, and to permit persons to whom the
18  * Software is furnished to do so, subject to the following conditions:
19  *
20  * The above copyright notice and this permission notice shall be included in
21  * all copies or substantial portions of the Software.
22  *
23  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
26  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
28  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
29  * DEALINGS IN THE SOFTWARE.
30  */
31 #include "g_traceable_nvoc.h"
32 
33 #ifndef __ANCI_TRACEABLE_H__
34 #define __ANCI_TRACEABLE_H__
35 
36 #include "core/core.h"
37 
38 
39 // Private field names are wrapped in PRIVATE_FIELD, which does nothing for
40 // the matching C source file, but causes diagnostics to be issued if another
41 // source file references the field.
42 #ifdef NVOC_TRACEABLE_H_PRIVATE_ACCESS_ALLOWED
43 #define PRIVATE_FIELD(x) x
44 #else
45 #define PRIVATE_FIELD(x) NVOC_PRIVATE_FIELD(x)
46 #endif
47 
48 struct OBJTRACEABLE {
49     const struct NVOC_RTTI *__nvoc_rtti;
50     struct OBJTRACEABLE *__nvoc_pbase_OBJTRACEABLE;
51 };
52 
53 #ifndef __NVOC_CLASS_OBJTRACEABLE_TYPEDEF__
54 #define __NVOC_CLASS_OBJTRACEABLE_TYPEDEF__
55 typedef struct OBJTRACEABLE OBJTRACEABLE;
56 #endif /* __NVOC_CLASS_OBJTRACEABLE_TYPEDEF__ */
57 
58 #ifndef __nvoc_class_id_OBJTRACEABLE
59 #define __nvoc_class_id_OBJTRACEABLE 0x6305d2
60 #endif /* __nvoc_class_id_OBJTRACEABLE */
61 
62 extern const struct NVOC_CLASS_DEF __nvoc_class_def_OBJTRACEABLE;
63 
64 #define __staticCast_OBJTRACEABLE(pThis) \
65     ((pThis)->__nvoc_pbase_OBJTRACEABLE)
66 
67 #ifdef __nvoc_traceable_h_disabled
68 #define __dynamicCast_OBJTRACEABLE(pThis) ((OBJTRACEABLE*)NULL)
69 #else //__nvoc_traceable_h_disabled
70 #define __dynamicCast_OBJTRACEABLE(pThis) \
71     ((OBJTRACEABLE*)__nvoc_dynamicCast(staticCast((pThis), Dynamic), classInfo(OBJTRACEABLE)))
72 #endif //__nvoc_traceable_h_disabled
73 
74 
75 NV_STATUS __nvoc_objCreateDynamic_OBJTRACEABLE(OBJTRACEABLE**, Dynamic*, NvU32, va_list);
76 
77 NV_STATUS __nvoc_objCreate_OBJTRACEABLE(OBJTRACEABLE**, Dynamic*, NvU32);
78 #define __objCreate_OBJTRACEABLE(ppNewObj, pParent, createFlags) \
79     __nvoc_objCreate_OBJTRACEABLE((ppNewObj), staticCast((pParent), Dynamic), (createFlags))
80 
81 #undef PRIVATE_FIELD
82 
83 
84 void objTraverseCaptureState_IMPL(struct Object *pObj);
85 #define objTraverseCaptureState(p) objTraverseCaptureState_IMPL(staticCast((p), Object))
86 
87 #endif // __ANCI_TRACEABLE_H__
88 
89 #ifdef __cplusplus
90 } // extern "C"
91 #endif
92 
93 #endif // _G_TRACEABLE_NVOC_H_
94