WIP FPC-III support
[linux/fpc-iii.git] / tools / perf / scripts / perl / Perf-Trace-Util / Context.c
blob25c47d23a130ce1396f23561459a06755db4af15
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3 * This file was generated automatically by ExtUtils::ParseXS version 2.18_02 from the
4 * contents of Context.xs. Do not edit this file, edit Context.xs instead.
6 * ANY CHANGES MADE HERE WILL BE LOST!
7 */
8 #include <stdbool.h>
9 #ifndef HAS_BOOL
10 # define HAS_BOOL 1
11 #endif
12 #line 1 "Context.xs"
14 * Context.xs. XS interfaces for perf script.
16 * Copyright (C) 2009 Tom Zanussi <tzanussi@gmail.com>
19 #include "EXTERN.h"
20 #include "perl.h"
21 #include "XSUB.h"
22 #include "../../../util/trace-event.h"
24 #ifndef PERL_UNUSED_VAR
25 # define PERL_UNUSED_VAR(var) if (0) var = var
26 #endif
28 #line 42 "Context.c"
30 XS(XS_Perf__Trace__Context_common_pc); /* prototype to pass -Wmissing-prototypes */
31 XS(XS_Perf__Trace__Context_common_pc)
33 #ifdef dVAR
34 dVAR; dXSARGS;
35 #else
36 dXSARGS;
37 #endif
38 if (items != 1)
39 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_pc", "context");
40 PERL_UNUSED_VAR(cv); /* -W */
42 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
43 int RETVAL;
44 dXSTARG;
46 RETVAL = common_pc(context);
47 XSprePUSH; PUSHi((IV)RETVAL);
49 XSRETURN(1);
53 XS(XS_Perf__Trace__Context_common_flags); /* prototype to pass -Wmissing-prototypes */
54 XS(XS_Perf__Trace__Context_common_flags)
56 #ifdef dVAR
57 dVAR; dXSARGS;
58 #else
59 dXSARGS;
60 #endif
61 if (items != 1)
62 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_flags", "context");
63 PERL_UNUSED_VAR(cv); /* -W */
65 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
66 int RETVAL;
67 dXSTARG;
69 RETVAL = common_flags(context);
70 XSprePUSH; PUSHi((IV)RETVAL);
72 XSRETURN(1);
76 XS(XS_Perf__Trace__Context_common_lock_depth); /* prototype to pass -Wmissing-prototypes */
77 XS(XS_Perf__Trace__Context_common_lock_depth)
79 #ifdef dVAR
80 dVAR; dXSARGS;
81 #else
82 dXSARGS;
83 #endif
84 if (items != 1)
85 Perl_croak(aTHX_ "Usage: %s(%s)", "Perf::Trace::Context::common_lock_depth", "context");
86 PERL_UNUSED_VAR(cv); /* -W */
88 struct scripting_context * context = INT2PTR(struct scripting_context *,SvIV(ST(0)));
89 int RETVAL;
90 dXSTARG;
92 RETVAL = common_lock_depth(context);
93 XSprePUSH; PUSHi((IV)RETVAL);
95 XSRETURN(1);
98 #ifdef __cplusplus
99 extern "C"
100 #endif
101 XS(boot_Perf__Trace__Context); /* prototype to pass -Wmissing-prototypes */
102 XS(boot_Perf__Trace__Context)
104 #ifdef dVAR
105 dVAR; dXSARGS;
106 #else
107 dXSARGS;
108 #endif
109 const char* file = __FILE__;
111 PERL_UNUSED_VAR(cv); /* -W */
112 PERL_UNUSED_VAR(items); /* -W */
113 XS_VERSION_BOOTCHECK ;
115 newXSproto("Perf::Trace::Context::common_pc", XS_Perf__Trace__Context_common_pc, file, "$");
116 newXSproto("Perf::Trace::Context::common_flags", XS_Perf__Trace__Context_common_flags, file, "$");
117 newXSproto("Perf::Trace::Context::common_lock_depth", XS_Perf__Trace__Context_common_lock_depth, file, "$");
118 if (PL_unitcheckav)
119 call_list(PL_scopestack_ix, PL_unitcheckav);
120 XSRETURN_YES;