Rishka
RISC-V virtual runtime in C/C++ made for ESP32-WROVER
func_args.h File Reference

Header file defining macros and types for handling function arguments in the Rishka SDK. More...

Go to the source code of this file.

Macros

#define func_arg_start(ap, param)   __builtin_va_start(ap, param)
 Macro for starting traversal of function arguments. More...
 
#define func_arg_get(ap, type)   __builtin_va_arg(ap, type)
 Macro for accessing function arguments. More...
 
#define func_arg_end(ap)   __builtin_va_end(ap)
 Macro for ending traversal of function arguments. More...
 

Typedefs

typedef __builtin_va_list func_arg_list
 Type representing a list of function arguments. More...
 

Detailed Description

Header file defining macros and types for handling function arguments in the Rishka SDK.

Author
Nathanne Isip

This header file provides macros and types for handling function arguments in the Rishka SDK. It defines a type func_arg_list representing a list of function arguments and macros for starting, accessing, and ending the traversal of function arguments.

Macro Definition Documentation

◆ func_arg_end

#define func_arg_end (   ap)    __builtin_va_end(ap)

Macro for ending traversal of function arguments.

This macro ends the traversal of function arguments represented by the func_arg_list object ap.

Parameters
apA func_arg_list object representing the list of function arguments.

◆ func_arg_get

#define func_arg_get (   ap,
  type 
)    __builtin_va_arg(ap, type)

Macro for accessing function arguments.

This macro retrieves the next argument of type type from the func_arg_list object ap.

Parameters
apA func_arg_list object representing the list of function arguments.
typeThe type of the argument to retrieve.
Returns
The next argument of the specified type.

◆ func_arg_start

#define func_arg_start (   ap,
  param 
)    __builtin_va_start(ap, param)

Macro for starting traversal of function arguments.

This macro initializes a func_arg_list object ap for traversing the function arguments starting from the parameter param.

Parameters
apA func_arg_list object to be initialized.
paramThe last named parameter before the variadic arguments.

Typedef Documentation

◆ func_arg_list

Type representing a list of function arguments.

This typedef represents a list of function arguments, allowing functions to accept variable numbers of arguments.