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

SCM Repository

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

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

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1011 - (download) (as text) (annotate)
Thu Jan 10 20:22:04 2002 UTC (18 years, 10 months ago) by blume
File size: 1210 byte(s)
updates to pgraph and, more importantly, to NLFFI
 * This module defines a high-level interface for dlopen.
 *   While addresses (those obtained by applying function "addr" below
 *   or addresses derived from those) will not remain valid across
 *   export{ML,Fn}/restart, handles *will* stay valid.
 * (C) 2001, Lucent Technologies, Bell Laboratories
 * author: Matthias Blume
signature DYN_LINKAGE = sig

    exception DynLinkError of string

    type lib_handle		(* handle on dynamically linked library (DL) *)
    type addr_handle		(* handle on address obtained from a DL *)

    val main_lib : lib_handle	(* the runtime system itself *)

    (* link new library and return its handle *)
    val open_lib : { name: string, lazy: bool, global: bool } -> lib_handle

    (* get the address handle of a symbol exported from a DL *)
    val lib_symbol : lib_handle * string -> addr_handle

    (* fetch the actual address from an address handle; the value obtained
     * is not valid across export{ML,Fn}/resume cycles *)
    val addr : addr_handle -> Word32.word

    (* unlink previously linked DL; this immediately invalidates all
     * symbol addresses and handles associated with this library *)
    val close_lib : lib_handle -> unit

ViewVC Help
Powered by ViewVC 1.0.0