agileRTOS (zrtos)  Version 0.8.0 (ghostbuster)
vm_function_index.h File Reference
#include <zrtos/types.h>
#include <zrtos/cast.h>
#include <zrtos/mem.h>
#include <zrtos/vm_function.h>
Include dependency graph for vm_function_index.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _zrtos_vm_function_index_t
 

Macros

#define ZRTOS_VM_FUNCTION_INDEX(name, ...)
 

Typedefs

typedef struct _zrtos_vm_function_index_t zrtos_vm_function_index_t
 

Functions

bool zrtos_vm_function_index__init (zrtos_vm_function_index_t *thiz, zrtos_vm_function_t *arr, size_t length)
 
zrtos_vm_function_tzrtos_vm_function_index__get_function (zrtos_vm_function_index_t *thiz, zrtos_vm_function_id_t id)
 

Macro Definition Documentation

◆ ZRTOS_VM_FUNCTION_INDEX

#define ZRTOS_VM_FUNCTION_INDEX (   name,
  ... 
)
Value:
zrtos_vm_function_t name[] = { \
__VA_ARGS__ \
,{} \
};

Definition at line 20 of file vm_function_index.h.

Typedef Documentation

◆ zrtos_vm_function_index_t

Function Documentation

◆ zrtos_vm_function_index__get_function()

zrtos_vm_function_t* zrtos_vm_function_index__get_function ( zrtos_vm_function_index_t thiz,
zrtos_vm_function_id_t  id 
)

Definition at line 41 of file vm_function_index.h.

44  {
45  zrtos_vm_function_t key = {
46  .id = id
47  };
48  return ZRTOS_CAST(
51  &key
52  ,thiz->arr
53  ,thiz->length
54  ,sizeof(zrtos_vm_function_t)
56  )
57  );
58 }
#define ZRTOS_CAST(type, value)
Definition: cast.h:18
int zrtos_vm_function__cmp(const void *aa, const void *bb)
Definition: vm_function.h:38
void * zrtos_mem__search(const void *key, const void *base, size_t high, size_t size, int(*compar)(const void *, const void *))
Definition: mem.h:148
zrtos_vm_function_t * arr
zrtos_vm_function_id_t id
Definition: vm_function.h:26
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zrtos_vm_function_index__init()

bool zrtos_vm_function_index__init ( zrtos_vm_function_index_t thiz,
zrtos_vm_function_t arr,
size_t  length 
)

Definition at line 31 of file vm_function_index.h.

35  {
36  thiz->arr = arr;
37  thiz->length = length;
38  return true;
39 }
zrtos_vm_function_t * arr