agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
va.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2024 ykat UG (haftungsbeschraenkt) - All Rights Reserved
3  *
4  * Permission for non-commercial use is hereby granted,
5  * free of charge, without warranty of any kind.
6  */
7 #ifndef ZRTOS_VA_H
8 #define ZRTOS_VA_H
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12 
13 
14 #include <stdarg.h>
15 
16 #include <zrtos/assert.h>
17 
18 
19 #define zrtos_va_t va_list
20 #define zrtos_va__start va_start
21 #define zrtos_va__arg(ap,type)\
22  ({\
23  ZRTOS_ASSERT__STATIC(sizeof(type) <= sizeof(int));\
24  ((type)va_arg(ap,int));\
25  })
26 #define zrtos_va__arg_ptr(ap,type)\
27  (type)va_arg(ap,type)
28 #define zrtos_va__end va_end
29 #define zrtos_va__copy va_copy
30 
31 
32 #ifdef __cplusplus
33 }
34 #endif
35 #endif