7#ifndef ZEPHYR_INCLUDE_SYS_CBPRINTF_CXX_H_
8#define ZEPHYR_INCLUDE_SYS_CBPRINTF_CXX_H_
12static inline int z_cbprintf_cxx_is_pchar(
char *)
17static inline int z_cbprintf_cxx_is_pchar(
const char *)
22static inline int z_cbprintf_cxx_is_pchar(
volatile char *)
27static inline int z_cbprintf_cxx_is_pchar(
const volatile char *)
32static inline int z_cbprintf_cxx_is_pchar(
wchar_t *)
37static inline int z_cbprintf_cxx_is_pchar(
const wchar_t *)
42static inline int z_cbprintf_cxx_is_pchar(
volatile wchar_t *)
47static inline int z_cbprintf_cxx_is_pchar(
const volatile wchar_t *)
52template <
typename T >
53static inline int z_cbprintf_cxx_is_pchar(T arg)
55 _Pragma(
"GCC diagnostic push")
56 _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"")
58 _Pragma("GCC diagnostic pop")
62static inline
size_t z_cbprintf_cxx_arg_size(
float f)
66 return sizeof(double);
69static inline size_t z_cbprintf_cxx_arg_size(
void *
p)
73 return sizeof(
void *);
76template <
typename T >
77static inline size_t z_cbprintf_cxx_arg_size(T arg)
79 return sizeof(arg + 0);
83static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
float arg)
85 double d = (double)arg;
88 z_cbprintf_wcpy((
int *)dst, (
int *)
p,
sizeof(
d) /
sizeof(
int));
91static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
void *
p)
93 z_cbprintf_wcpy((
int *)dst, (
int *)&
p,
sizeof(
p) /
sizeof(
int));
96static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
char arg)
100 z_cbprintf_wcpy((
int *)dst, &tmp, 1);
103static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
unsigned char arg)
107 z_cbprintf_wcpy((
int *)dst, &tmp, 1);
110static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
signed char arg)
114 z_cbprintf_wcpy((
int *)dst, &tmp, 1);
117static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
short arg)
121 z_cbprintf_wcpy((
int *)dst, &tmp, 1);
124static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst,
unsigned short arg)
128 z_cbprintf_wcpy((
int *)dst, &tmp, 1);
131template <
typename T >
132static inline void z_cbprintf_cxx_store_arg(
uint8_t *dst, T arg)
134 size_t wlen = z_cbprintf_cxx_arg_size(arg) /
sizeof(int);
137 z_cbprintf_wcpy((
int *)dst, (
int *)
p, wlen);
141static inline int z_cbprintf_cxx_is_longdouble(
long double arg)
147template <
typename T >
148static inline int z_cbprintf_cxx_is_longdouble(T arg)
156static inline size_t z_cbprintf_cxx_alignment(
float arg)
163static inline size_t z_cbprintf_cxx_alignment(
double arg)
170static inline size_t z_cbprintf_cxx_alignment(
long double arg)
177static inline size_t z_cbprintf_cxx_alignment(
long long arg)
184static inline size_t z_cbprintf_cxx_alignment(
unsigned long long arg)
191template <
typename T >
192static inline size_t z_cbprintf_cxx_alignment(T arg)
irp nz macro MOVR cc d
Definition: asm-macro-32-bit-gnu.h:11
#define VA_STACK_MIN_ALIGN
Definition: cbprintf_internal.h:44
#define VA_STACK_ALIGN(type)
Definition: cbprintf_internal.h:48
#define MAX(a, b)
The larger value between a and b.
Definition: util.h:168
struct k_futex f
Definition: kobject.c:1319
struct k_pipe p
Definition: kobject.c:1311
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58