master
rs 61 lines 1.62 KB
Raw
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 // This file is @generated by tracetool, do not edit.
3
4 #[allow(unused_imports)]
5 use std::ffi::c_char;
6 #[allow(unused_imports)]
7 use util::bindings;
8
9 #[allow(dead_code)]
10 #[inline(always)]
11 fn trace_event_state_is_enabled(dstate: u16) -> bool {
12 (unsafe { trace_events_enabled_count }) != 0 && dstate != 0
13 }
14
15 extern "C" {
16 #[allow(dead_code)]
17 static mut trace_events_enabled_count: u32;
18 }
19 extern "C" {
20 #[allow(dead_code)]
21 static mut _TRACE_TEST_BLAH_DSTATE: u16;
22 #[allow(dead_code)]
23 static mut _TRACE_TEST_WIBBLE_DSTATE: u16;
24 }
25
26 #[inline(always)]
27 #[allow(dead_code)]
28 pub fn trace_test_blah_enabled() -> bool
29 {
30 trace_event_state_is_enabled(unsafe { _TRACE_TEST_BLAH_DSTATE}) ||
31 false
32 }
33
34 #[inline(always)]
35 #[allow(dead_code)]
36 pub fn trace_test_blah(_context: *mut (), _filename: &std::ffi::CStr)
37 {
38 if trace_event_state_is_enabled(unsafe { _TRACE_TEST_BLAH_DSTATE}) {
39 extern "C" { fn _simple_trace_test_blah(_context: *mut (), _filename: *const std::ffi::c_char); }
40 unsafe { _simple_trace_test_blah(_context, _filename.as_ptr()); }
41 }
42 }
43
44 #[inline(always)]
45 #[allow(dead_code)]
46 pub fn trace_test_wibble_enabled() -> bool
47 {
48 trace_event_state_is_enabled(unsafe { _TRACE_TEST_WIBBLE_DSTATE}) ||
49 false
50 }
51
52 #[inline(always)]
53 #[allow(dead_code)]
54 pub fn trace_test_wibble(_context: *mut (), _value: std::ffi::c_int)
55 {
56 if trace_event_state_is_enabled(unsafe { _TRACE_TEST_WIBBLE_DSTATE}) {
57 extern "C" { fn _simple_trace_test_wibble(_context: *mut (), _value: std::ffi::c_int); }
58 unsafe { _simple_trace_test_wibble(_context, _value); }
59 }
60 }
61