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

Go to the source code of this file.

Macros

#define STACK_ARG_SIZE(x)   ALIGN(x, FFI_SIZEOF_ARG)
 

Functions

static ffi_status initialize_aggregate_packed_struct (ffi_type *arg)
 
int ffi_prep_args (char *stack, extended_cif *ecif)
 
ffi_status FFI_HIDDEN ffi_prep_cif_core (ffi_cif *cif, ffi_abi abi, unsigned int isvariadic, unsigned int nfixedargs, unsigned int ntotalargs, ffi_type *rtype, ffi_type **atypes)
 
ffi_status ffi_prep_cif_machdep (ffi_cif *cif)
 
void ffi_call_SYSV (int(*)(char *, extended_cif *), extended_cif *, unsigned, unsigned, unsigned *, void(*fn)()) __attribute__((__visibility__("hidden")))
 
void ffi_call (ffi_cif *cif, void(*fn)(), void *rvalue, void **avalue)
 
const char ffi_cris_trampoline_template [] __attribute__ ((__visibility__("hidden")))
 
static unsigned long long ffi_prep_closure_inner (void **params, 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

◆ STACK_ARG_SIZE

#define STACK_ARG_SIZE (   x)    ALIGN(x, FFI_SIZEOF_ARG)

Definition at line 32 of file ffi.c.

Referenced by ffi_prep_cif_core().

Function Documentation

◆ __attribute__()

const char ffi_cris_trampoline_template [] __attribute__ ( (__visibility__("hidden"))  )

◆ ffi_call()

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

◆ ffi_call_SYSV()

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

◆ ffi_prep_args()

int ffi_prep_args ( char *  stack,
extended_cif ecif 
)

Definition at line 70 of file ffi.c.

References extended_cif::avalue, extended_cif::cif, FFI_ASSERT, FFI_HIDDEN, and memcpy.

◆ ffi_prep_cif_core()

ffi_status FFI_HIDDEN ffi_prep_cif_core ( ffi_cif *  cif,
ffi_abi  abi,
unsigned int  isvariadic,
unsigned int  nfixedargs,
unsigned int  ntotalargs,
ffi_type *  rtype,
ffi_type **  atypes 
)

◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep ( ffi_cif *  cif)

Definition at line 219 of file ffi.c.

References ffi_call_SYSV().

◆ ffi_prep_closure_inner()

static unsigned long long ffi_prep_closure_inner ( void **  params,
ffi_closure *  closure 
)
static

Definition at line 297 of file ffi.c.

References alloca(), FFI_ASSERT, and size.

Referenced by ffi_prep_closure_loc().

◆ 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 
)

◆ initialize_aggregate_packed_struct()

static ffi_status initialize_aggregate_packed_struct ( ffi_type *  arg)
static

Definition at line 35 of file ffi.c.

References FFI_ASSERT, ffi_type_test(), and NULL.

Referenced by ffi_prep_cif_core().