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/branches/rt-transition/idl-specs/smlnj-runtime.sml
ViewVC logotype

View of /sml/branches/rt-transition/idl-specs/smlnj-runtime.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2983 - (download) (annotate)
Sat Apr 12 16:26:30 2008 UTC (12 years, 10 months ago) by jhr
File size: 8805 byte(s)
  Move idl-specs into a higher-level directory, since they are used
  to generate both SML and runtime-system code.
(*
 * This file was automatically generated by ml-idl
 * (Tue Jul  3 13:57:41 2007)
 *)

structure SMLNJRuntime : SMLNJ_RUNTIME = struct
structure C = Unsafe.CInterface
type idl_string = String.string
type cfun_idl_string = String.string
type ML_word8vec_t = Word8Vector.vector
type cfun_ML_word8vec_t = Word8Vector.vector
type ML_word8vec_opt_t = Word8Vector.vector option
type cfun_ML_word8vec_opt_t = Word8Vector.vector option
type ML_word8arr_t = Word8Array.array
type cfun_ML_word8arr_t = Word8Array.array
type ML_charvec_t = CharVector.vector
type cfun_ML_charvec_t = CharVector.vector
type ML_charvec_opt_t = CharVector.vector option
type cfun_ML_charvec_opt_t = CharVector.vector option
type ML_chararr_t = CharArray.array
type cfun_ML_chararr_t = CharArray.array
type ML_unit_t = unit
type cfun_ML_unit_t = unit
type ML_bool_t = bool
type cfun_ML_bool_t = bool
type ML_int_t = int
type cfun_ML_int_t = int
type ML_int32_t = Int32.int
type cfun_ML_int32_t = Int32.int
type ML_string_t = string
type cfun_ML_string_t = string
type ML_string_opt_t = string option
type cfun_ML_string_opt_t = string option
type ML_string_list_t = string list
type cfun_ML_string_list_t = string list
type ML_int_opt_t = int option
type cfun_ML_int_opt_t = int option
type ML_word_arr_opt_t = word array option
type cfun_ML_word_arr_opt_t = word array option
type ML_int_arr_opt_t = int array option
type cfun_ML_int_arr_opt_t = int array option
type ML_int_pair_opt_t = (Int32.int * int) option
type cfun_ML_int_pair_opt_t = (Int32.int * int) option
type ML_string_intref_list_t = (string * int ref) list
type cfun_ML_string_intref_list_t = (string * int ref) list
type ML_sysconst_t = CInterface.system_const
type cfun_ML_sysconst_t = CInterface.system_const
type ML_sysconst_list_t = CInterface.system_const list
type cfun_ML_sysconst_list_t = CInterface.system_const list
type ML_sysconst_list_opt_t = CInterface.system_const list option
type cfun_ML_sysconst_list_opt_t = CInterface.system_const list option
type ML_object_t = Unsafe.Object.object
type cfun_ML_object_t = Unsafe.Object.object
type ML_objectvec_t = Unsafe.Object.object Vector.vector
type cfun_ML_objectvec_t = Unsafe.Object.object Vector.vector
type ML_object_object_fn_t = Unsafe.Object.object -> Unsafe.Object.object
type cfun_ML_object_object_fn_t = Unsafe.Object.object -> Unsafe.Object.object
val cfun_allocCode : Int.int -> cfun_ML_word8arr_t = C.c_function "SMLNJRuntime" "allocCode"
fun allocCode(nbytes) = let
  val m_nbytes = (fn (x) => x)(nbytes)
  val (m_result) = cfun_allocCode (m_nbytes)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_nbytes)
in
  (result)
end
val cfun_mkExec : (cfun_ML_word8arr_t * Int32.int) -> cfun_ML_object_object_fn_t = C.c_function "SMLNJRuntime" "mkExec"
fun mkExec(code,entrypoint) = let
  val m_code = (fn x => x)(code)
  val m_entrypoint = (fn (x) => x)(entrypoint)
  val (m_result) = cfun_mkExec (m_code,m_entrypoint)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_code)
  val _ = (fn _ => ()) (m_entrypoint)
in
  (result)
end
val cfun_mkLiterals : cfun_ML_word8vec_t -> cfun_ML_objectvec_t = C.c_function "SMLNJRuntime" "mkLiterals"
fun mkLiterals(arg) = let
  val m_arg = (fn x => x)(arg)
  val (m_result) = cfun_mkLiterals (m_arg)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_arg)
in
  (result)
end
val cfun_setTimer : cfun_ML_bool_t -> unit = C.c_function "SMLNJRuntime" "setTimer"
fun setTimer(sts) = let
  val m_sts = (fn x => x)(sts)
  val () = cfun_setTimer (m_sts)
  val _ = (fn _ => ()) (m_sts)
in
  ()
end
val cfun_getQuantum : unit -> Int.int = C.c_function "SMLNJRuntime" "getQuantum"
fun getQuantum() = let
  val (m_result) = cfun_getQuantum ()
  val result = (fn (x) => x)(m_result)
in
  (result)
end
val cfun_setTimeArray : cfun_ML_int_arr_opt_t -> unit = C.c_function "SMLNJRuntime" "setTimeArray"
fun setTimeArray(prof_cnt_array) = let
  val m_prof_cnt_array = (fn x => x)(prof_cnt_array)
  val () = cfun_setTimeArray (m_prof_cnt_array)
  val _ = (fn _ => ()) (m_prof_cnt_array)
in
  ()
end
val cfun_intervalTick : unit -> (cfun_ML_int32_t * Int.int) = C.c_function "SMLNJRuntime" "intervalTick"
fun intervalTick() = let
  val (m_a,m_b) = cfun_intervalTick ()
  val a = (((fn x => x) o (fn (x) => x)) m_a)
  val b = (((fn (x) => x) o (fn (x) => x)) m_b)
  val _ = (fn _ => ()) (m_a)
  val _ = (fn _ => ()) (m_b)
in
  (a,b)
end
val cfun_setIntTimer : cfun_ML_int_pair_opt_t -> unit = C.c_function "SMLNJRuntime" "setIntTimer"
fun setIntTimer(itv) = let
  val m_itv = (fn x => x)(itv)
  val () = cfun_setIntTimer (m_itv)
  val _ = (fn _ => ()) (m_itv)
in
  ()
end
val cfun_exportHeap : String.string -> cfun_ML_bool_t = C.c_function "SMLNJRuntime" "exportHeap"
fun exportHeap(fname) = let
  val m_fname = (fn (x) => x)(fname)
  val (m_result) = cfun_exportHeap (m_fname)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_fname)
in
  (result)
end
val cfun_listSignals : unit -> cfun_ML_sysconst_list_t = C.c_function "SMLNJRuntime" "listSignals"
fun listSignals() = let
  val (m_result) = cfun_listSignals ()
  val result = (fn x => x)(m_result)
in
  (result)
end
val cfun_getSigState : cfun_ML_sysconst_t -> Int.int = C.c_function "SMLNJRuntime" "getSigState"
fun getSigState(sc) = let
  val m_sc = (fn x => x)(sc)
  val (m_result) = cfun_getSigState (m_sc)
  val result = (fn (x) => x)(m_result)
  val _ = (fn _ => ()) (m_sc)
in
  (result)
end
val cfun_setSigState : (cfun_ML_sysconst_t * Int.int) -> unit = C.c_function "SMLNJRuntime" "setSigState"
fun setSigState(sc,i) = let
  val m_sc = (fn x => x)(sc)
  val m_i = (fn (x) => x)(i)
  val () = cfun_setSigState (m_sc,m_i)
  val _ = (fn _ => ()) (m_sc)
  val _ = (fn _ => ()) (m_i)
in
  ()
end
val cfun_getSigMask : unit -> cfun_ML_sysconst_list_opt_t = C.c_function "SMLNJRuntime" "getSigMask"
fun getSigMask() = let
  val (m_result) = cfun_getSigMask ()
  val result = (fn x => x)(m_result)
in
  (result)
end
val cfun_setSigMask : cfun_ML_sysconst_list_opt_t -> unit = C.c_function "SMLNJRuntime" "setSigMask"
fun setSigMask(m) = let
  val m_m = (fn x => x)(m)
  val () = cfun_setSigMask (m_m)
  val _ = (fn _ => ()) (m_m)
in
  ()
end
val cfun_pauseUntilSig : unit -> unit = C.c_function "SMLNJRuntime" "pauseUntilSig"
fun pauseUntilSig() = let
  val () = cfun_pauseUntilSig ()
in
  ()
end
val cfun_rawArgv : unit -> cfun_ML_string_list_t = C.c_function "SMLNJRuntime" "rawArgv"
fun rawArgv() = let
  val (m_result) = cfun_rawArgv ()
  val result = (fn x => x)(m_result)
in
  (result)
end
val cfun_shiftArgv : unit -> unit = C.c_function "SMLNJRuntime" "shiftArgv"
fun shiftArgv() = let
  val () = cfun_shiftArgv ()
in
  ()
end
val cfun_sysInfo : String.string -> cfun_ML_string_opt_t = C.c_function "SMLNJRuntime" "sysInfo"
fun sysInfo(name) = let
  val m_name = (fn (x) => x)(name)
  val (m_result) = cfun_sysInfo (m_name)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_name)
in
  (result)
end
val cfun_gcControl : cfun_ML_string_intref_list_t -> unit = C.c_function "SMLNJRuntime" "gcControl"
fun gcControl(cmds) = let
  val m_cmds = (fn x => x)(cmds)
  val () = cfun_gcControl (m_cmds)
  val _ = (fn _ => ()) (m_cmds)
in
  ()
end
val cfun_debug : String.string -> unit = C.c_function "SMLNJRuntime" "debug"
fun debug(s) = let
  val m_s = (fn (x) => x)(s)
  val () = cfun_debug (m_s)
  val _ = (fn _ => ()) (m_s)
in
  ()
end
val cfun_dummy : String.string -> unit = C.c_function "SMLNJRuntime" "dummy"
fun dummy(s) = let
  val m_s = (fn (x) => x)(s)
  val () = cfun_dummy (m_s)
  val _ = (fn _ => ()) (m_s)
in
  ()
end
val cfun_recordConcat : (cfun_ML_object_t * cfun_ML_object_t) -> cfun_ML_object_t = C.c_function "SMLNJRuntime" "recordConcat"
fun recordConcat(rec1,rec2) = let
  val m_rec1 = (fn x => x)(rec1)
  val m_rec2 = (fn x => x)(rec2)
  val (m_result) = cfun_recordConcat (m_rec1,m_rec2)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_rec1)
  val _ = (fn _ => ()) (m_rec2)
in
  (result)
end
val cfun_record1 : cfun_ML_object_t -> cfun_ML_object_t = C.c_function "SMLNJRuntime" "record1"
fun record1(obj) = let
  val m_obj = (fn x => x)(obj)
  val (m_result) = cfun_record1 (m_obj)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_obj)
in
  (result)
end
val cfun_blastIn : String.string -> cfun_ML_object_t = C.c_function "SMLNJRuntime" "blastIn"
fun blastIn(s) = let
  val m_s = (fn (x) => x)(s)
  val (m_result) = cfun_blastIn (m_s)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_s)
in
  (result)
end
val cfun_blastOut : cfun_ML_object_t -> cfun_ML_word8vec_t = C.c_function "SMLNJRuntime" "blastOut"
fun blastOut(obj) = let
  val m_obj = (fn x => x)(obj)
  val (m_result) = cfun_blastOut (m_obj)
  val result = (fn x => x)(m_result)
  val _ = (fn _ => ()) (m_obj)
in
  (result)
end
end


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