cpp: Use #pragma once instead of #ifndef guards
[ghc.git] / includes / rts / StaticPtrTable.h
1 /* -----------------------------------------------------------------------------
2 *
3 * (c) The GHC Team, 2008-2009
4 *
5 * Initialization of the Static Pointer Table
6 *
7 * Do not #include this file directly: #include "Rts.h" instead.
8 *
9 * To understand the structure of the RTS headers, see the wiki:
10 * http://ghc.haskell.org/trac/ghc/wiki/Commentary/SourceTree/Includes
11 *
12 * -------------------------------------------------------------------------- */
13
14 #pragma once
15
16 /** Inserts an entry in the Static Pointer Table.
17 *
18 * The key is a fingerprint computed from the static pointer and the spe_closure
19 * is a pointer to the closure defining the table entry.
20 *
21 * A stable pointer to the closure is made to prevent it from being garbage
22 * collected while the entry exists on the table.
23 *
24 * This function is called from the code generated by
25 * compiler/deSugar/StaticPtrTable.sptInitCode
26 *
27 * */
28 void hs_spt_insert (StgWord64 key[2],void* spe_closure);
29
30 /** Inserts an entry for a StgTablePtr in the Static Pointer Table.
31 *
32 * This function is called from the GHCi interpreter to insert
33 * SPT entries for bytecode objects.
34 *
35 * */
36 void hs_spt_insert_stableptr(StgWord64 key[2], StgStablePtr *entry);
37
38 /** Removes an entry from the Static Pointer Table.
39 *
40 * This function is called from the code generated by
41 * compiler/deSugar/StaticPtrTable.sptInitCode
42 *
43 * */
44 void hs_spt_remove (StgWord64 key[2]);