GATE
functions.h File Reference

Generic function invocation utilities. More...

#include "gate/gate_core_api.h"
#include "gate/gatetypes.h"

Classes

struct  gate_function_value_blob_class
 
union  gate_function_value_class
 
struct  gate_function_argument
 

Macros

#define GATE_FUNCTION_ARG_NONE   0
 
#define GATE_FUNCTION_ARG_UCHAR   1
 
#define GATE_FUNCTION_ARG_SCHAR   2
 
#define GATE_FUNCTION_ARG_USHORT   3
 
#define GATE_FUNCTION_ARG_SSHORT   4
 
#define GATE_FUNCTION_ARG_UINT   5
 
#define GATE_FUNCTION_ARG_SINT   6
 
#define GATE_FUNCTION_ARG_ULONG   7
 
#define GATE_FUNCTION_ARG_SLONG   8
 
#define GATE_FUNCTION_ARG_ULONGLONG   9
 
#define GATE_FUNCTION_ARG_SLONGLONG   10
 
#define GATE_FUNCTION_ARG_FLOAT   11
 
#define GATE_FUNCTION_ARG_DOUBLE   12
 
#define GATE_FUNCTION_ARG_LONGDOUBLE   13
 
#define GATE_FUNCTION_ARG_POINTER   14
 
#define GATE_FUNCTION_ARG_BLOB   15
 
#define GATE_FUNCTION_FAULT_UNKNOWN   0
 
#define GATE_FUNCTION_FAULT_ADDRESS   1
 
#define GATE_FUNCTION_FAULT_INSTRUCTION   2
 
#define GATE_FUNCTION_FAULT_PRIVILEGE   3
 
#define GATE_FUNCTION_FAULT_ARITHMETIC   4
 
#define GATE_FUNCTION_FAULT_OVERFLOW   5
 
#define GATE_FUNCTION_FAULT_FLOAT   6
 
#define GATE_FUNCTION_FAULT_BREAKPOINT   7
 
#define GATE_FUNCTION_FAULT_ALIGNMENT   8
 
#define GATE_FUNCTION_FAULT_STACK   9
 
#define GATE_FUNCTION_FAULT_SYSTEM   10
 

Typedefs

typedef struct gate_function_value_blob_class gate_function_value_blob_t
 
typedef union gate_function_value_class gate_function_value_t
 
typedef struct gate_function_argument gate_function_argument_t
 
typedef gate_result_t(* gate_function_fault_handler_t) (unsigned fault_code, void *user_param)
 

Functions

GATE_CORE_API gate_result_t gate_function_invoke_generic (void *func_ptr, gate_uint32_t flags, gate_function_argument_t *args, gate_size_t arg_count, gate_function_argument_t *retval)
 

 
GATE_CORE_API gate_result_t gate_function_invoke_guarded (gate_entrypoint_t entry_point, void *entry_param, gate_function_fault_handler_t fault_handler, void *fault_param)
 

 

Detailed Description

Generic function invocation utilities.