1 // =================================
 2 // Copyright (c) 2024 Seppo Laakko
 3 // Distributed under the MIT license
 4 // =================================
 5 
 6 namespace System.Runtime
 7 {
 8     public class TraceEntry
 9     {
10         public TraceEntry(long fn_) : next(null)fn(fn_)line(0) {}
11         public TraceEntry* next;
12         public long fn;
13         public int line;
14     }
15 
16     public class TraceGuard
17     {
18         public TraceGuard(TraceEntry* entry_) : entry(entry_)
19         {
20             RtmPushFunction(cast<void*>(entry));
21         }
22         public ~TraceGuard()
23         {
24             RtmPopFunction(cast<void*>(entry));
25         }
26         private TraceEntry* entry;
27     }