Ruby: ext/fiddle/libffi-3.2.1/src/vax/ffi.c File Reference

Ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c52d4d35cc6a173c89eda98ceffa2dcf)

Macros | Functions
ffi.c File Reference
`#include <ffi.h>`
`#include <ffi_common.h>`
`#include <stdlib.h>`
`#include <unistd.h>`

Go to the source code of this file.

## Macros
#define | CIF_FLAGS_CHAR 1 /* for struct only */
#define | CIF_FLAGS_SHORT 2 /* for struct only */
#define | CIF_FLAGS_INT 4
#define | CIF_FLAGS_DINT 8

## Functions
void | ffi_call_elfbsd (extended_cif *, unsigned, unsigned, void *, void(*)())
void * | ffi_prep_args (extended_cif *ecif, void *stack)
ffi_status | ffi_prep_cif_machdep (ffi_cif *cif)
void | ffi_call (ffi_cif *cif, void(*fn)(), void *rvalue, void **avalue)
void | ffi_closure_elfbsd (void)
void | ffi_closure_struct_elfbsd (void)
unsigned int | ffi_closure_elfbsd_inner (ffi_closure *, void *, char *)
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

## ◆ CIF_FLAGS_CHAR

#define CIF_FLAGS_CHAR 1 /* for struct only */

Definition at line 37 of file ffi.c.

## ◆ CIF_FLAGS_DINT

#define CIF_FLAGS_DINT 8

Definition at line 40 of file ffi.c.

## ◆ CIF_FLAGS_INT

#define CIF_FLAGS_INT 4

Definition at line 39 of file ffi.c.

## ◆ CIF_FLAGS_SHORT

#define CIF_FLAGS_SHORT 2 /* for struct only */

Definition at line 38 of file ffi.c.

## Function Documentation

## ◆ ffi_call()

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

Definition at line 163 of file ffi.c.

References alloca, extended_cif::avalue, extended_cif::cif, FFI_ASSERT, ffi_call_elfbsd(), FFI_ELFBSD, NULL, and extended_cif::rvalue.

## ◆ ffi_call_elfbsd()

void ffi_call_elfbsd | ( | extended_cif * | ,
|  | unsigned | ,
|  | unsigned | ,
|  | void * | ,
|  | void(*)() |
| ) |  |

Referenced by ffi_call().

## ◆ ffi_closure_elfbsd()

void ffi_closure_elfbsd | ( | void |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_closure_elfbsd_inner()

unsigned int ffi_closure_elfbsd_inner | ( | ffi_closure * | closure,
|  | void * | resp,
|  | char * | stack
| ) |  |

Definition at line 226 of file ffi.c.

References alloca.

## ◆ ffi_closure_struct_elfbsd()

void ffi_closure_struct_elfbsd | ( | void |  | ) |

Referenced by ffi_prep_closure_loc().

## ◆ ffi_prep_args()

void * ffi_prep_args | ( | extended_cif * | ecif,
|  | void * | stack
| ) |  |

Definition at line 51 of file ffi.c.

References ALIGN, extended_cif::avalue, extended_cif::cif, FFI_ASSERT, int(), memcpy, NULL, and extended_cif::rvalue.

## ◆ ffi_prep_cif_machdep()

ffi_status ffi_prep_cif_machdep | ( | ffi_cif * | cif | ) |

Definition at line 122 of file ffi.c.

References CIF_FLAGS_CHAR, CIF_FLAGS_DINT, CIF_FLAGS_INT, and CIF_FLAGS_SHORT.

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

References FFI_ASSERT, ffi_closure_elfbsd(), ffi_closure_struct_elfbsd(), FFI_ELFBSD, and int().