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 HI(x)   ((((unsigned int) (x)) >> 16) & 0xffff)
 
#define LO(x)   (((unsigned int) (x)) & 0xffff)
 

Functions

UINT64 ffi_call_sysv (void(*)(char *, extended_cif *), extended_cif *, unsigned, void(*fn)(void))
 
void ffi_closure_sysv (void)
 
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
 
void ffi_prep_args (char *stack, extended_cif *ecif)
 
void ffi_call (ffi_cif *cif, void(*fn)(void), void *rvalue, void **avalue)
 
static UINT64 ffi_closure_helper (unsigned char *args, ffi_closure *closure)
 
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

◆ HI

#define HI (   x)    ((((unsigned int) (x)) >> 16) & 0xffff)

Referenced by ffi_prep_closure_loc().

◆ LO

#define LO (   x)    (((unsigned int) (x)) & 0xffff)

Referenced by ffi_prep_closure_loc().

Function Documentation

◆ ffi_call()

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

◆ ffi_call_sysv()

UINT64 ffi_call_sysv ( void(*)(char *, extended_cif *)  ,
extended_cif ,
unsigned  ,
void(*)(void)  fn 
)

Referenced by ffi_call().

◆ ffi_closure_helper()

static UINT64 ffi_closure_helper ( unsigned char *  args,
ffi_closure *  closure 
)
static

Definition at line 203 of file ffi.c.

References ALIGN, alloca(), result, and size.

Referenced by ffi_prep_closure_loc().

◆ ffi_closure_sysv()

void ffi_closure_sysv ( void  )

Referenced by ffi_prep_closure_loc().

◆ ffi_prep_args()

void ffi_prep_args ( char *  stack,
extended_cif ecif 
)

Definition at line 81 of file ffi.c.

References ALIGN, extended_cif::avalue, extended_cif::cif, FFI_ASSERT, memcpy, extended_cif::rvalue, and size.

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

Definition at line 60 of file ffi.c.

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

References ffi_closure_helper(), ffi_closure_sysv(), FFI_SYSV, HI, if(), and LO.