Ruby  2.4.2p198(2017-09-14revision59899)
Macros | Functions
ffi.c File Reference
#include <ffi.h>
#include <ffi_common.h>
#include <stdlib.h>
Include dependency graph for ffi.c:

Go to the source code of this file.

Macros

#define NGREGARG   4
 
#define STRUCT_VALUE_ADDRESS_WITH_ARG   0
 
#define OFS_INT8   3
 
#define OFS_INT16   2
 

Functions

static int simple_type (ffi_type *arg)
 
static int return_type (ffi_type *arg)
 
void ffi_prep_args (char *stack, extended_cif *ecif)
 
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
 
void ffi_call_SYSV (void(*)(char *, extended_cif *), extended_cif *, unsigned, unsigned, unsigned *, void(*fn)(void))
 
void ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
 
void ffi_closure_SYSV (void)
 
ffi_status ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
 
int ffi_closure_helper_SYSV (ffi_closure *closure, void *rvalue, unsigned long *pgr, unsigned long *pfr, unsigned long *pst)
 

Macro Definition Documentation

◆ NGREGARG

#define NGREGARG   4

Definition at line 33 of file ffi.c.

Referenced by ffi_closure_helper_SYSV(), ffi_prep_args(), and ffi_prep_cif_machdep().

◆ OFS_INT16

#define OFS_INT16   2

Definition at line 510 of file ffi.c.

Referenced by ffi_closure_helper_SYSV().

◆ OFS_INT8

#define OFS_INT8   3

Definition at line 509 of file ffi.c.

Referenced by ffi_closure_helper_SYSV().

◆ STRUCT_VALUE_ADDRESS_WITH_ARG

#define STRUCT_VALUE_ADDRESS_WITH_ARG   0

Definition at line 41 of file ffi.c.

Referenced by ffi_closure_helper_SYSV(), ffi_prep_args(), and ffi_prep_cif_machdep().

Function Documentation

◆ ffi_call()

void ffi_call ( ffi_cif *  cif,
void(*)(void)  fn,
void *  rvalue,
void **  avalue 
)

◆ ffi_call_SYSV()

void ffi_call_SYSV ( void(*)(char *, extended_cif *)  ,
extended_cif ,
unsigned  ,
unsigned  ,
unsigned *  ,
void(*)(void)  fn 
)

◆ ffi_closure_helper_SYSV()

int ffi_closure_helper_SYSV ( ffi_closure *  closure,
void *  rvalue,
unsigned long *  pgr,
unsigned long *  pfr,
unsigned long *  pst 
)

◆ ffi_closure_SYSV()

void ffi_closure_SYSV ( void  )

Definition at line 53 of file ffi.c.

◆ ffi_prep_args()

void ffi_prep_args ( char *  stack,
extended_cif ecif 
)

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

Definition at line 322 of file ffi.c.

References ffi_call_SYSV(), NFREGARG, NGREGARG, return_type(), size, and STRUCT_VALUE_ADDRESS_WITH_ARG.

◆ ffi_prep_closure_loc()

ffi_status ffi_prep_closure_loc ( ffi_closure *  closure,
ffi_cif *  cif,
void(*)(ffi_cif *, void *, void **, void *)  fun,
void *  user_data,
void *  codeloc 
)

Definition at line 457 of file ffi.c.

References __ic_invalidate(), ffi_closure_SYSV(), FFI_SYSV, and return_type().

◆ return_type()

static int return_type ( ffi_type *  arg)
static

◆ simple_type()

static int simple_type ( ffi_type *  arg)
static

Definition at line 46 of file ffi.c.

Referenced by return_type().