Lines Matching +full:node +full:- +full:api
6 Copyright (C) 2008-2019 Anthony Green and Red Hat, Inc.
27 INFO-DIR-SECTION Development
28 START-INFO-DIR-ENTRY
30 END-INFO-DIR-ENTRY
33 File: libffi.info, Node: Top, Next: Introduction, Up: (dir)
41 Copyright (C) 2008-2019 Anthony Green and Red Hat, Inc.
70 File: libffi.info, Node: Introduction, Next: Using libffi, Prev: Top, Up: Top
86 told at run-time about the number and types of arguments used to call a
103 File: libffi.info, Node: Using libffi, Next: Missing Features, Prev: Introduction, Up: Top
110 * The Basics:: The basic libffi API.
114 * The Closure API:: Writing a generic function.
119 File: libffi.info, Node: The Basics, Next: Simple Example, Up: Using libffi
134 -- Function: ffi_status ffi_prep_cif (ffi_cif *CIF, ffi_abi ABI,
157 -- Function: ffi_status ffi_prep_cif_var (ffi_cif *CIF, ffi_abi ABI,
185 -- Function: void ffi_call (ffi_cif *CIF, void *FN, void *RVALUE, void
212 copying pass-by-value arguments is placed on the caller.
214 Note that while the return value must be register-sized, arguments
218 RVALUE should point to an object declared as a larger type -
222 File: libffi.info, Node: Simple Example, Next: Types, Prev: The Basics, Up: Using libffi
263 File: libffi.info, Node: Types, Next: Multiple ABIs, Prev: Simple Example, Up: Using libffi
270 * Primitive Types:: Built-in types.
279 File: libffi.info, Node: Primitive Types, Next: Structures, Up: Types
282 ---------------------
284 'Libffi' provides a number of built-in type descriptors that can be used
292 An unsigned, 8-bit integer type.
295 A signed, 8-bit integer type.
298 An unsigned, 16-bit integer type.
301 A signed, 16-bit integer type.
304 An unsigned, 32-bit integer type.
307 A signed, 32-bit integer type.
310 An unsigned, 64-bit integer type.
313 A signed, 64-bit integer type.
371 File: libffi.info, Node: Structures, Next: Size and Alignment, Prev: Primitive Types, Up: Types
374 ----------------
380 -- Data type: ffi_type
392 This is a 'NULL'-terminated array of pointers to 'ffi_type'
395 Note that 'libffi' has no special support for bit-fields. You
402 File: libffi.info, Node: Size and Alignment, Next: Arrays Unions Enums, Prev: Structures, Up: T…
405 ------------------------
413 * The size or alignment of some of the built-in types may vary
433 size_t size = desired_type->size;
434 unsigned short alignment = desired_type->alignment;
440 -- Function: ffi_status ffi_get_struct_offsets (ffi_abi abi, ffi_type
447 providing enough space for all the results to be written - one
458 File: libffi.info, Node: Arrays Unions Enums, Next: Type Example, Prev: Size and Alignment, Up:…
461 --------------------------------------
486 Note that arrays cannot be passed or returned by value in C -
526 if (union_elements[i]->size > union_type.size)
529 size = union_elements[i]->size;
531 if (union_elements[i]->alignment > union_type.alignment)
532 union_type.alignment = union_elements[i]->alignment;
541 exactly which type will be used cannot be determined by 'libffi' - it
543 '-fshort-enums'. *Note (gcc)Structures unions enumerations and
544 bit-fields implementation::, for more information about how GCC handles
548 File: libffi.info, Node: Type Example, Next: Complex, Prev: Arrays Unions Enums, Up: Types
551 ------------------
596 File: libffi.info, Node: Complex, Next: Complex Type Example, Prev: Type Example, Up: Types
599 -------------------
603 built-in type descriptors 'ffi_type_complex_float',
610 -- Data type: ffi_type
623 This is a 'NULL'-terminated array of pointers to 'ffi_type'
636 File: libffi.info, Node: Complex Type Example, Prev: Complex, Up: Types
639 --------------------------
719 The new type descriptors can then be used like one of the built-in
723 File: libffi.info, Node: Multiple ABIs, Next: The Closure API, Prev: Types, Up: Using libffi
732 necessarily platform-specific.
735 File: libffi.info, Node: The Closure API, Next: Closure Example, Prev: Multiple ABIs, Up: Using…
737 2.5 The Closure API
740 'libffi' also provides a way to write a generic function - a function
745 This facility is called the "closure API". Closures are not supported
750 require special allocation on platforms that have a non-executable heap.
753 -- Function: void *ffi_closure_alloc (size_t SIZE, void **CODE)
760 -- Function: void ffi_closure_free (void *WRITABLE)
768 -- Function: ffi_status ffi_prep_closure_loc (ffi_closure *CLOSURE,
825 appropriate pointer-to-function type.
832 File: libffi.info, Node: Closure Example, Next: Thread Safety, Prev: The Closure API, Up: Using…
891 File: libffi.info, Node: Thread Safety, Prev: Closure Example, Up: Using libffi
896 'libffi' is not completely thread-safe. However, many parts are, and if
897 you follow some simple rules, you can use it safely in a multi-threaded
913 File: libffi.info, Node: Missing Features, Next: Index, Prev: Using libffi, Up: Top
925 * The "raw" API is undocumented.
927 * The Go API is undocumented.
933 File: libffi.info, Node: Index, Prev: Missing Features, Up: Top
945 * closure API: The Closure API. (line 13)
946 * closures: The Closure API. (line 13)
949 * FFI_CLOSURES: The Closure API. (line 13)
950 * ffi_closure_alloc: The Closure API. (line 19)
951 * ffi_closure_free: The Closure API. (line 26)
955 * ffi_prep_closure_loc: The Closure API. (line 34)
959 * ffi_status <3>: The Closure API. (line 34)
990 * void <1>: The Closure API. (line 19)
991 * void <2>: The Closure API. (line 26)
996 Node: Top1388
997 Node: Introduction2841
998 Node: Using libffi4473
999 Node: The Basics5006
1000 Node: Simple Example9870
1001 Node: Types10901
1002 Node: Primitive Types11412
1003 Node: Structures13533
1004 Node: Size and Alignment14572
1005 Node: Arrays Unions Enums16769
1006 Node: Type Example19698
1007 Node: Complex20989
1008 Node: Complex Type Example22407
1009 Node: Multiple ABIs25459
1010 Node: The Closure API25830
1011 Node: Closure Example29656
1012 Node: Thread Safety31288
1013 Node: Missing Features32089
1014 Node: Index32551