1 // Licensed to the Apache Software Foundation (ASF) under one 2 // or more contributor license agreements. See the NOTICE file 3 // distributed with this work for additional information 4 // regarding copyright ownership. The ASF licenses this file 5 // to you under the Apache License, Version 2.0 (the 6 // "License"); you may not use this file except in compliance 7 // with the License. You may obtain a copy of the License at 8 // 9 // http://www.apache.org/licenses/LICENSE-2.0 10 // 11 // Unless required by applicable law or agreed to in writing, 12 // software distributed under the License is distributed on an 13 // "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 14 // KIND, either express or implied. See the License for the 15 // specific language governing permissions and limitations 16 // under the License. 17 18 #[cfg(feature = "std")] 19 use std::os::raw::*; 20 #[cfg(not(feature = "std"))] 21 use core::ffi::*; 22 23 extern "C" { trace_ext_puts(str: *const c_char)24 pub fn trace_ext_puts(str: *const c_char); trace_ext_get_thread_id() -> c_int25 pub fn trace_ext_get_thread_id() -> c_int; trace_set_level(level: c_int)26 pub fn trace_set_level(level: c_int); trace_get_level() -> c_int27 pub fn trace_get_level() -> c_int; trace_printf( func: *const c_char, line: c_int, level: c_int, level_ok: bool, fmt: *const c_char, ... )28 pub fn trace_printf( 29 func: *const c_char, 30 line: c_int, 31 level: c_int, 32 level_ok: bool, 33 fmt: *const c_char, 34 ... 35 ); dhex_dump( function: *const c_char, line: c_int, level: c_int, buf: *const c_void, len: c_int, )36 pub fn dhex_dump( 37 function: *const c_char, 38 line: c_int, 39 level: c_int, 40 buf: *const c_void, 41 len: c_int, 42 ); 43 } 44