Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Annotation of /sml/trunk/src/ml-nlffi-lib/memory/linkage.sig
ViewVC logotype

Annotation of /sml/trunk/src/ml-nlffi-lib/memory/linkage.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 828 - (view) (download) (as text)

1 : blume 828 (*
2 :     * This module defines a high-level interface for dlopen.
3 :     * While addresses (those obtained by applying function "addr" below
4 :     * or addresses derived from those) will not remain valid across
5 :     * export{ML,Fn}/restart, handles *will* stay valid.
6 :     *
7 :     * (C) 2001, Lucent Technologies, Bell Laboratories
8 :     *
9 :     * author: Matthias Blume
10 :     *)
11 :     signature DYN_LINKAGE = sig
12 :    
13 :     exception DynLinkError of string
14 :    
15 :     type lib_handle (* handle on dynamically linked library (DL) *)
16 :     type addr_handle (* handle on address obtained from a DL *)
17 :    
18 :     val main_lib : lib_handle (* the runtime system itself *)
19 :    
20 :     (* link new library and return its handle *)
21 :     val open_lib : { name: string, lazy: bool, global: bool } -> lib_handle
22 :    
23 :     (* get the address handle of a symbol exported from a DL *)
24 :     val lib_symbol : lib_handle -> string -> addr_handle
25 :    
26 :     (* fetch the actual address from an address handle; the value obtained
27 :     * is not valid across export{ML,Fn}/resume cycles *)
28 :     val addr : addr_handle -> Word32.word
29 :    
30 :     (* unlink previously linked DL; this immediately invalidates all
31 :     * symbol addresses and handles associated with this library *)
32 :     val close_lib : lib_handle -> unit
33 :     end

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0