File: join_misc.mli

package info (click to toggle)
jocaml 4.01.0-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 16,736 kB
  • ctags: 23,836
  • sloc: ml: 111,262; ansic: 32,746; sh: 6,057; lisp: 4,230; makefile: 3,861; asm: 3,734; awk: 88; perl: 45; fortran: 21; sed: 19; cs: 9
file content (60 lines) | stat: -rw-r--r-- 2,041 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
(***********************************************************************)
(*                                                                     *)
(*                           Objective Caml                            *)
(*                                                                     *)
(*            Luc Maranget, projet Moscova, INRIA Rocquencourt         *)
(*                                                                     *)
(*  Copyright 2005 Institut National de Recherche en Informatique et   *)
(*  en Automatique.  All rights reserved.  This file is distributed    *)
(*  under the terms of the Q Public License version 1.0.               *)
(*                                                                     *)
(***********************************************************************)

(* $Id: join_misc.mli 8337 2007-06-12 13:00:25Z maranget $ *)


(****************************)
(* Readers/writer controler *)
(****************************)

type controler

val controler_create : unit -> controler
val protect_read : controler -> ('a -> 'b) -> 'a -> 'b
val protect_write : controler -> ('a -> 'b) -> 'a -> 'b

(*******************************************)
(* Locked counters, with detection of zero *)
(*******************************************)

type counter

val counter_create : unit -> counter
val incr : counter -> unit
val decr : counter -> unit
val wait_zero : counter -> unit

(*****************************)
(* Misc stuff for exceptions *)
(*****************************)

val prerr_exn : exn -> unit
val exn_to_string : exn -> string

(*****************************)
(* Wrapped socket primitives *)
(*****************************)

val local_name : string
val get_local_addr : unit -> Unix.inet_addr
val string_of_sockaddr : Unix.sockaddr -> string

(* Why not put this here ! *)
(* To commit suicide from join managed threads : raise JoinExit *)
exception JoinExit

(************************)
(* Join library options *)
(************************)

val globalize_flags : Marshal.extern_flags list