diff options
Diffstat (limited to 'includes/rts/ForeignExports.h')
-rw-r--r-- | includes/rts/ForeignExports.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/includes/rts/ForeignExports.h b/includes/rts/ForeignExports.h new file mode 100644 index 0000000000..f8828e59d4 --- /dev/null +++ b/includes/rts/ForeignExports.h @@ -0,0 +1,36 @@ +/* ----------------------------------------------------------------------------- + * + * (c) The GHC Team, 1995-2009 + * + * Interface to the RTS's foreign export tracking code. + * + * Do not #include this file directly: #include "Rts.h" instead. + * + * To understand the structure of the RTS headers, see the wiki: + * https://gitlab.haskell.org/ghc/ghc/wikis/commentary/source-tree/includes + * + * ---------------------------------------------------------------------------*/ + +#pragma once + +struct _ObjectCode; + +/* N.B. See Note [Tracking foreign exports] in + * rts/ForeignExports.c. */ +struct ForeignExportsList { + /* a link field for linking these together into lists. + */ + struct ForeignExportsList *next; + /* the length of ->exports */ + int n_entries; + /* if the RTS linker loaded the module, + * to which ObjectCode these exports belong. */ + struct _ObjectCode *oc; + /* if the RTS linker loaded the module, + * this points to an array of length ->n_entries + * recording the StablePtr for each export. */ + StgPtr exports[]; +}; + +void registerForeignExports(struct ForeignExportsList *exports); + |