7#ifndef ZEPHYR_INCLUDE_SYS_CBPRINTF_INTERNAL_H_ 
    8#define ZEPHYR_INCLUDE_SYS_CBPRINTF_INTERNAL_H_ 
   17#include <zephyr/arch/cpu.h> 
   25#define VA_STACK_ALIGN(type)    1 
   26#elif defined(__sparc__) 
   28#define VA_STACK_ALIGN(type)    1 
   29#elif defined(__x86_64__) 
   30#define VA_STACK_MIN_ALIGN      8 
   31#elif defined(__aarch64__) 
   32#define VA_STACK_MIN_ALIGN      8 
   33#elif defined(CONFIG_ARC) 
   34#define VA_STACK_MIN_ALIGN      ARCH_STACK_PTR_ALIGN 
   36#ifdef CONFIG_RISCV_ISA_RV32E 
   37#define VA_STACK_ALIGN(type)    4 
   39#define VA_STACK_MIN_ALIGN      (__riscv_xlen / 8) 
   47#ifndef VA_STACK_MIN_ALIGN 
   48#define VA_STACK_MIN_ALIGN      1 
   52#define VA_STACK_ALIGN(type)    MAX(VA_STACK_MIN_ALIGN, __alignof__(type)) 
   55static inline void z_cbprintf_wcpy(
int *dst, 
int *src, 
size_t len)
 
   57        for (
size_t i = 0; i < len; i++) {
 
   80#define Z_CBPRINTF_VA_STACK_LL_DBL_MEMCPY       1 
   82#define Z_CBPRINTF_VA_STACK_LL_DBL_MEMCPY       0 
   92#define Z_CBPRINTF_IS_PCHAR(x, flags) \ 
   93        z_cbprintf_cxx_is_pchar(x, (flags) & CBPRINTF_PACKAGE_CONST_CHAR_RO) 
   95#define Z_CBPRINTF_IS_PCHAR(x, flags) \ 
   99                const char * : ((flags) & CBPRINTF_PACKAGE_CONST_CHAR_RO) ? 0 : 1, \ 
  100                volatile char * : 1, \ 
  101                const volatile char * : 1, \ 
  103                unsigned char * : 1, \ 
  104                const unsigned char * : ((flags) & CBPRINTF_PACKAGE_CONST_CHAR_RO) ? 0 : 1, \ 
  105                volatile unsigned char * : 1, \ 
  106                const volatile unsigned char * : 1,\ 
  109                const wchar_t * : ((flags) & CBPRINTF_PACKAGE_CONST_CHAR_RO) ? 0 : 1, \ 
  110                volatile wchar_t * : 1, \ 
  111                const volatile wchar_t * : 1, \ 
  126#define Z_CBPRINTF_IS_X_PCHAR(idx, x, flags) \ 
  127          (idx < Z_CBPRINTF_PACKAGE_FIRST_RO_STR_CNT_GET(flags) ? \ 
  128                0 : Z_CBPRINTF_IS_PCHAR(x, flags)) 
  138#define Z_CBPRINTF_HAS_PCHAR_ARGS(flags, fmt, ...) \ 
  139        (FOR_EACH_IDX_FIXED_ARG(Z_CBPRINTF_IS_X_PCHAR, (+), flags, __VA_ARGS__)) 
  141#define Z_CBPRINTF_PCHAR_COUNT(flags, ...) \ 
  142        COND_CODE_0(NUM_VA_ARGS_LESS_1(__VA_ARGS__), \ 
  144                    (Z_CBPRINTF_HAS_PCHAR_ARGS(flags, __VA_ARGS__))) 
  155#define Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, ...) ({\ 
  156        _Pragma("GCC diagnostic push") \
 
  157        _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
 
  159        if ((flags) & CBPRINTF_PACKAGE_ADD_RW_STR_POS) { \
 
  162                _rv = Z_CBPRINTF_PCHAR_COUNT(flags, __VA_ARGS__) > 0 ? 1 : 0; \
 
  164        _Pragma("GCC diagnostic pop")\
 
  168#define Z_CBPRINTF_MUST_RUNTIME_PACKAGE(flags, ...) 1 
  181#define Z_CBPRINTF_ARG_SIZE(v) z_cbprintf_cxx_arg_size(v) 
  183#define Z_CBPRINTF_ARG_SIZE(v) ({\ 
  184        __auto_type __v = (v) + 0; \ 
  187        size_t __arg_size = _Generic((v), \ 
  188                float : sizeof(double), \ 
  203#define Z_CBPRINTF_STORE_ARG(buf, arg) z_cbprintf_cxx_store_arg(buf, arg) 
  205#define Z_CBPRINTF_STORE_ARG(buf, arg) do { \ 
  206        if (Z_CBPRINTF_VA_STACK_LL_DBL_MEMCPY) { \ 
  208                __auto_type _v = (arg) + 0; \ 
  209                double _d = _Generic((arg) + 0, \ 
  216                size_t arg_size = Z_CBPRINTF_ARG_SIZE(arg); \ 
  217                size_t _wsize = arg_size / sizeof(int); \ 
  218                z_cbprintf_wcpy((int *)buf, \ 
  219                              (int *) _Generic((arg) + 0, float : &_d, default : &_v), \ 
  222                *_Generic((arg) + 0, \ 
  224                        unsigned char: (int *)buf, \ 
  225                        short : (int *)buf, \ 
  226                        unsigned short : (int *)buf, \ 
  228                        unsigned int : (unsigned int *)buf, \ 
  229                        long : (long *)buf, \ 
  230                        unsigned long : (unsigned long *)buf, \ 
  231                        long long : (long long *)buf, \ 
  232                        unsigned long long : (unsigned long long *)buf, \ 
  233                        float : (double *)buf, \ 
  234                        double : (double *)buf, \ 
  235                        long double : (long double *)buf, \ 
  237                                (const void **)buf) = arg; \ 
  249#define Z_CBPRINTF_ALIGNMENT(_arg) z_cbprintf_cxx_alignment(_arg) 
  251#define Z_CBPRINTF_ALIGNMENT(_arg) \ 
  252        MAX(_Generic((_arg) + 0, \ 
  253                float : VA_STACK_ALIGN(double), \ 
  254                double : VA_STACK_ALIGN(double), \ 
  255                long double : VA_STACK_ALIGN(long double), \ 
  256                long long : VA_STACK_ALIGN(long long), \ 
  257                unsigned long long : VA_STACK_ALIGN(long long), \ 
  259                        __alignof__((_arg) + 0)), VA_STACK_MIN_ALIGN) 
  273#if defined(__x86_64__) || defined(__riscv) || defined(__aarch64__) 
  274#define Z_CBPRINTF_IS_LONGDOUBLE(x) 0 
  276#define Z_CBPRINTF_IS_LONGDOUBLE(x) z_cbprintf_cxx_is_longdouble(x) 
  279#define Z_CBPRINTF_IS_LONGDOUBLE(x) \ 
  280        _Generic((x) + 0, long double : 1, default : 0) 
  298#define Z_CBPRINTF_PACK_ARG2(arg_idx, _buf, _idx, _align_offset, _max, _arg) \ 
  300        BUILD_ASSERT(!((sizeof(double) < VA_STACK_ALIGN(long double)) && \ 
  301                        Z_CBPRINTF_IS_LONGDOUBLE(_arg) && \ 
  302                        !IS_ENABLED(CONFIG_CBPRINTF_PACKAGE_LONGDOUBLE)),\ 
  303                        "Packaging of long double not enabled in Kconfig."); \
 
  304        while (_align_offset % Z_CBPRINTF_ALIGNMENT(_arg) != 0UL) { \
 
  305                _idx += sizeof(int); \
 
  306                _align_offset += sizeof(int); \
 
  308        uint32_t _arg_size = Z_CBPRINTF_ARG_SIZE(_arg); \
 
  309        uint32_t _loc = _idx / sizeof(int); \
 
  310        if (arg_idx < 1 + _fros_cnt) { \
 
  312                        _ros_pos_buf[_ros_pos_idx++] = _loc; \
 
  314        } else if (Z_CBPRINTF_IS_PCHAR(_arg, 0)) { \
 
  316                        if (Z_CBPRINTF_IS_X_PCHAR(arg_idx, _arg, _flags)) { \
 
  318                                        _rws_buffer[_rws_pos_idx++] = arg_idx - 1; \
 
  319                                        _rws_buffer[_rws_pos_idx++] = _loc; \
 
  323                                        _ros_pos_buf[_ros_pos_idx++] = _loc; \
 
  326                } else if (_rws_pos_en) { \
 
  327                        _rws_buffer[_rws_pos_idx++] = arg_idx - 1; \
 
  328                        _rws_buffer[_rws_pos_idx++] = _idx / sizeof(int); \
 
  331        if (_buf && _idx < (int)_max) { \
 
  332                Z_CBPRINTF_STORE_ARG(&_buf[_idx], _arg); \
 
  335        _align_offset += _arg_size; \
 
  344#define Z_CBPRINTF_PACK_ARG(arg_idx, arg) \ 
  345        Z_CBPRINTF_PACK_ARG2(arg_idx, _pbuf, _pkg_len, _pkg_offset, _pmax, arg) 
  353#define Z_CBPRINTF_SUPPRESS_SIZEOF_ARRAY_DECAY \ 
  354        _Pragma("GCC diagnostic ignored \"-Wsizeof-array-decay\"")
 
  356#define Z_CBPRINTF_SUPPRESS_SIZEOF_ARRAY_DECAY 
  365#ifdef CONFIG_NO_OPTIMIZATIONS 
  366#define Z_CBPRINTF_ON_STACK_ALLOC(_name, _len) \ 
  367        __ASSERT(_len <= 32, "Too many string arguments."); \
 
  368        uint8_t _name##_buf32[32]; \
 
  369        _name = _name##_buf32
 
  371#define Z_CBPRINTF_ON_STACK_ALLOC(_name, _len) \ 
  372        __ASSERT(_len <= 32, "Too many string arguments."); \
 
  373        uint8_t _name##_buf4[4]; \
 
  374        uint8_t _name##_buf8[8]; \
 
  375        uint8_t _name##_buf12[12]; \
 
  376        uint8_t _name##_buf16[16]; \
 
  377        uint8_t _name##_buf32[32]; \
 
  378        _name = (_len) <= 4 ? _name##_buf4 : \
 
  379                ((_len) <= 8 ? _name##_buf8 : \
 
  380                ((_len) <= 12 ? _name##_buf12 : \
 
  381                ((_len) <= 16 ? _name##_buf16 : \
 
  414#define Z_CBPRINTF_STATIC_PACKAGE_GENERIC(buf, _inlen, _outlen, _align_offset, \ 
  417        _Pragma("GCC diagnostic push") \
 
  418        _Pragma("GCC diagnostic ignored \"-Wpointer-arith\"") \
 
  419        Z_CBPRINTF_SUPPRESS_SIZEOF_ARRAY_DECAY \
 
  420        BUILD_ASSERT(!IS_ENABLED(CONFIG_XTENSA) || \
 
  421                     (IS_ENABLED(CONFIG_XTENSA) && \
 
  422                      !(_align_offset % CBPRINTF_PACKAGE_ALIGNMENT)), \
 
  423                        "Xtensa requires aligned package."); \
 
  424        BUILD_ASSERT((_align_offset % sizeof(int)) == 0, \
 
  425                        "Alignment offset must be multiply of a word."); \
 
  426        IF_ENABLED(CONFIG_CBPRINTF_STATIC_PACKAGE_CHECK_ALIGNMENT, \
 
  427                (__ASSERT(!((uintptr_t)buf & (CBPRINTF_PACKAGE_ALIGNMENT - 1)), \
 
  428                          "Buffer must be aligned.");)) \
 
  429        uint32_t _flags = flags; \
 
  430        bool _ros_pos_en = (_flags) & CBPRINTF_PACKAGE_ADD_RO_STR_POS; \
 
  431        bool _rws_pos_en = (_flags) & CBPRINTF_PACKAGE_ADD_RW_STR_POS; \
 
  432        bool _cros_en = (_flags) & CBPRINTF_PACKAGE_CONST_CHAR_RO; \
 
  433        uint8_t *_pbuf = buf; \
 
  434        uint8_t _rws_pos_idx = 0; \
 
  435        uint8_t _ros_pos_idx = 0; \
 
  437        uint8_t _alls_cnt = Z_CBPRINTF_PCHAR_COUNT(0, __VA_ARGS__); \ 
  438        uint8_t _fros_cnt = Z_CBPRINTF_PACKAGE_FIRST_RO_STR_CNT_GET(_flags); \ 
  440        uint8_t _rws_cnt = _cros_en ? \ 
  441                Z_CBPRINTF_PCHAR_COUNT(_flags, __VA_ARGS__) : _alls_cnt - _fros_cnt; \ 
  442        uint8_t _ros_cnt = _ros_pos_en ? (1 + _alls_cnt - _rws_cnt) : 0; \ 
  443        uint8_t *_ros_pos_buf; \ 
  444        Z_CBPRINTF_ON_STACK_ALLOC(_ros_pos_buf, _ros_cnt); \ 
  445        uint8_t *_rws_buffer; \ 
  446        Z_CBPRINTF_ON_STACK_ALLOC(_rws_buffer, 2 * _rws_cnt); \ 
  447        size_t _pmax = !___is_null(buf) ? _inlen : INT32_MAX; \ 
  449        int _total_len = 0; \ 
  450        int _pkg_offset = _align_offset; \ 
  451        union cbprintf_package_hdr *_len_loc; \ 
  453        if (_rws_cnt && !((_flags) & CBPRINTF_PACKAGE_ADD_RW_STR_POS)) { \ 
  458        if (_pmax < sizeof(*_len_loc)) { \ 
  462        _len_loc = (union cbprintf_package_hdr *)_pbuf; \ 
  463        _pkg_len += sizeof(*_len_loc); \ 
  464        _pkg_offset += sizeof(*_len_loc); \ 
  466        FOR_EACH_IDX(Z_CBPRINTF_PACK_ARG, (;), __VA_ARGS__);\ 
  467        _total_len = _pkg_len; \ 
  469        _total_len += _ros_cnt; \ 
  470        _total_len += 2 * _rws_cnt; \ 
  471        if (_pbuf != NULL) { \ 
  473                uint8_t *_pbuf_loc = &_pbuf[_pkg_len]; \ 
  474                for (size_t i = 0; i < _ros_cnt; i++) { \ 
  475                        *_pbuf_loc++ = _ros_pos_buf[i]; \ 
  477                for (size_t i = 0; i < (2 * _rws_cnt); i++) { \ 
  478                        *_pbuf_loc++ = _rws_buffer[i]; \ 
  482        _outlen = (_total_len > (int)_pmax) ? -ENOSPC : _total_len; \ 
  484        if (_pbuf != NULL) { \ 
  485                union cbprintf_package_hdr hdr = { \ 
  487                                .len = (uint8_t)(_pkg_len / sizeof(int)), \ 
  489                                .ro_str_cnt = _ros_cnt, \ 
  490                                .rw_str_cnt = _rws_cnt, \ 
  493                IF_ENABLED(CONFIG_CBPRINTF_PACKAGE_HEADER_STORE_CREATION_FLAGS, \ 
  494                           (hdr.desc.pkg_flags = flags)); \ 
  497        _Pragma("GCC diagnostic pop") \
 
  501#define Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, align_offset, flags, \ 
  503        Z_CBPRINTF_STATIC_PACKAGE_GENERIC(packaged, inlen, outlen, \ 
  504                                          align_offset, flags, __VA_ARGS__) 
  506#define Z_CBPRINTF_STATIC_PACKAGE(packaged, inlen, outlen, align_offset, flags, \ 
  510        if (((uintptr_t)packaged + 1) != 1) { \ 
  511                outlen = cbprintf_package(packaged, inlen, flags, __VA_ARGS__); \ 
  513                outlen = cbprintf_package(NULL, align_offset, flags, __VA_ARGS__); \ 
  522#ifdef CONFIG_CBPRINTF_PACKAGE_SUPPORT_TAGGED_ARGUMENTS 
  528#define Z_CBPRINTF_ARG_REMOVE_QUAL(arg) \ 
  529        z_cbprintf_cxx_remove_cv < \ 
  530                z_cbprintf_cxx_remove_reference < decltype(arg) > ::type \ 
  536#define Z_CBPRINTF_CXX_ARG_ARRAY_TYPE(arg) \ 
  537        z_cbprintf_cxx_remove_cv < \ 
  538                z_cbprintf_cxx_remove_extent < decltype(arg) > ::type \ 
  544#define Z_CBPRINTF_CXX_ARG_IS_TYPE_CHAR(type) \ 
  545        (z_cbprintf_cxx_is_same_type < type, \ 
  548         (z_cbprintf_cxx_is_same_type < type, \ 
  549          const char > :: value ? \ 
  551          (z_cbprintf_cxx_is_same_type < type, \ 
  552           volatile char > :: value ? \ 
  554           (z_cbprintf_cxx_is_same_type < type, \ 
  555            const volatile char > :: value ? \ 
  563#define Z_CBPRINTF_CXX_ARG_IS_CHAR_ARRAY(arg) \ 
  564        (z_cbprintf_cxx_is_array < decltype(arg) > :: value ? \ 
  565         (Z_CBPRINTF_CXX_ARG_IS_TYPE_CHAR(Z_CBPRINTF_CXX_ARG_ARRAY_TYPE(arg)) ? \ 
  574#define Z_CBPRINTF_ARG_TYPE(arg) \ 
  575        (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  577         CBPRINTF_PACKAGE_ARG_TYPE_CHAR : \ 
  578         (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  579          unsigned char > ::value ? \ 
  580          CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_CHAR : \ 
  581          (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  583           CBPRINTF_PACKAGE_ARG_TYPE_SHORT : \ 
  584           (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  585            unsigned short > ::value ? \ 
  586            CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_SHORT : \ 
  587            (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  589             CBPRINTF_PACKAGE_ARG_TYPE_INT : \ 
  590             (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  591              unsigned int > ::value ? \ 
  592              CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_INT : \ 
  593              (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  595               CBPRINTF_PACKAGE_ARG_TYPE_LONG : \ 
  596               (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  597                unsigned long > ::value ? \ 
  598                CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_LONG : \ 
  599                (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  600                 long long > ::value ? \ 
  601                 CBPRINTF_PACKAGE_ARG_TYPE_LONG_LONG : \ 
  602                 (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  603                  unsigned long long > ::value ? \ 
  604                  CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_LONG_LONG : \ 
  605                  (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  607                   CBPRINTF_PACKAGE_ARG_TYPE_FLOAT : \ 
  608                   (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  610                    CBPRINTF_PACKAGE_ARG_TYPE_DOUBLE : \ 
  611                    (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  612                     long double > ::value ? \ 
  613                     CBPRINTF_PACKAGE_ARG_TYPE_LONG_DOUBLE : \ 
  614                      (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  615                       char * > :: value ? \ 
  616                       CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR : \ 
  617                       (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  618                        const char * > :: value ? \ 
  619                        CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR : \ 
  620                        (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  621                         volatile char * > :: value ? \ 
  622                         CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR : \ 
  623                         (z_cbprintf_cxx_is_same_type < Z_CBPRINTF_ARG_REMOVE_QUAL(arg), \ 
  624                          const volatile char * > :: value ? \ 
  625                          CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR : \ 
  626                          (Z_CBPRINTF_CXX_ARG_IS_CHAR_ARRAY(arg) ? \ 
  627                           CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR : \ 
  628                           CBPRINTF_PACKAGE_ARG_TYPE_PTR_VOID)))))))))))))))))) 
  630#define Z_CBPRINTF_ARG_TYPE(arg) \ 
  632                char : CBPRINTF_PACKAGE_ARG_TYPE_CHAR, \ 
  633                unsigned char : CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_CHAR, \ 
  634                short : CBPRINTF_PACKAGE_ARG_TYPE_SHORT, \ 
  635                unsigned short : CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_SHORT, \ 
  636                int : CBPRINTF_PACKAGE_ARG_TYPE_INT, \ 
  637                unsigned int : CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_INT, \ 
  638                long : CBPRINTF_PACKAGE_ARG_TYPE_LONG, \ 
  639                unsigned long : CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_LONG, \ 
  640                long long : CBPRINTF_PACKAGE_ARG_TYPE_LONG_LONG, \ 
  641                unsigned long long : CBPRINTF_PACKAGE_ARG_TYPE_UNSIGNED_LONG_LONG, \ 
  642                float : CBPRINTF_PACKAGE_ARG_TYPE_FLOAT, \ 
  643                double : CBPRINTF_PACKAGE_ARG_TYPE_DOUBLE, \ 
  644                long double : CBPRINTF_PACKAGE_ARG_TYPE_LONG_DOUBLE, \ 
  645                char * : CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR, \ 
  646                const char * : CBPRINTF_PACKAGE_ARG_TYPE_PTR_CHAR, \ 
  647                void * : CBPRINTF_PACKAGE_ARG_TYPE_PTR_VOID, \ 
  649                        CBPRINTF_PACKAGE_ARG_TYPE_PTR_VOID \ 
  653#define Z_CBPRINTF_TAGGED_EMPTY_ARGS(...) \ 
  654        CBPRINTF_PACKAGE_ARG_TYPE_END 
  656#define Z_CBPRINTF_TAGGED_ARGS_3(arg) \ 
  657        Z_CBPRINTF_ARG_TYPE(arg), arg 
  659#define Z_CBPRINTF_TAGGED_ARGS_2(...) \ 
  660        FOR_EACH(Z_CBPRINTF_TAGGED_ARGS_3, (,), __VA_ARGS__), \ 
  661        CBPRINTF_PACKAGE_ARG_TYPE_END 
  663#define Z_CBPRINTF_TAGGED_ARGS(_num_args, ...) \ 
  664        COND_CODE_0(_num_args, \ 
  665                    (CBPRINTF_PACKAGE_ARG_TYPE_END), \ 
  666                    (Z_CBPRINTF_TAGGED_ARGS_2(__VA_ARGS__))) 
#define ALWAYS_INLINE
Definition: common.h:124
 
struct k_pipe p
Definition: kobject.c:1322