Ruby  2.7.0p0(2019-12-25revision647ee6f091eafcce70ffb75ddf7e121e192ab217)
Macros | Functions
ffi.c File Reference
#include <ffi.h>
#include <ffi_common.h>

Go to the source code of this file.

Macros

#define WORD_SIZE   sizeof(unsigned int)
 
#define ARGS_REGISTER_SIZE   (WORD_SIZE * 6)
 
#define WORD_ALIGN(x)   ALIGN(x, WORD_SIZE)
 

Functions

void ffi_call_SYSV (void(*)(void *, extended_cif *), extended_cif *, unsigned int, unsigned int, unsigned int *, void(*fn)(void), unsigned int, unsigned int)
 
void ffi_closure_SYSV (void)
 
void ffi_prep_args (void *stack, extended_cif *ecif)
 
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
 
void ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
 
void ffi_closure_call_SYSV (void *register_args, void *stack_args, ffi_closure *closure, void *rvalue, unsigned int *rtype, unsigned int *rsize)
 
ffi_status ffi_prep_closure_loc (ffi_closure *closure, ffi_cif *cif, void(*fun)(ffi_cif *, void *, void **, void *), void *user_data, void *codeloc)
 

Macro Definition Documentation

◆ ARGS_REGISTER_SIZE

#define ARGS_REGISTER_SIZE   (WORD_SIZE * 6)

Definition at line 37 of file ffi.c.

◆ WORD_ALIGN

#define WORD_ALIGN (   x)    ALIGN(x, WORD_SIZE)

Definition at line 38 of file ffi.c.

◆ WORD_SIZE

#define WORD_SIZE   sizeof(unsigned int)

Definition at line 36 of file ffi.c.

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(*)(void *, extended_cif *)  ,
extended_cif ,
unsigned int  ,
unsigned int  ,
unsigned int ,
void(*)(void fn,
unsigned int  ,
unsigned int   
)

◆ ffi_closure_call_SYSV()

void ffi_closure_call_SYSV ( void register_args,
void stack_args,
ffi_closure *  closure,
void rvalue,
unsigned int rtype,
unsigned int rsize 
)

Definition at line 177 of file ffi.c.

References alloca, ARGS_REGISTER_SIZE, i, memcpy(), NULL, ptr, size, WORD_ALIGN, and WORD_SIZE.

Referenced by ffi_prep_closure_loc().

◆ ffi_closure_SYSV()

void ffi_closure_SYSV ( void  )

Definition at line 53 of file ffi.c.

◆ ffi_prep_args()

void ffi_prep_args ( void stack,
extended_cif ecif 
)

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

Definition at line 138 of file ffi.c.

References FFI_SYSV.

◆ 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 277 of file ffi.c.

References ffi_closure_call_SYSV(), ffi_closure_SYSV(), FFI_SYSV, and long.