File: pthread.smi

package info (click to toggle)
smlsharp 4.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 123,732 kB
  • sloc: ansic: 16,725; sh: 4,347; makefile: 2,191; java: 742; haskell: 493; ruby: 305; cpp: 284; pascal: 256; ml: 255; lisp: 141; asm: 97; sql: 74
file content (19 lines) | stat: -rw-r--r-- 706 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
_require "basis.smi"
_require "ffi.smi"

structure Pthread =
struct
  type pthread_t (= ptr)
  type pthread_mutex_t (= boxed)
  type pthread_cond_t (= boxed)
  val new_pthread_mutex_t : unit -> pthread_mutex_t
  val new_pthread_cond_t : unit -> pthread_cond_t
  val pthread_join : pthread_t * unit ptr ref -> int
  val pthread_mutex_init : pthread_mutex_t * unit ptr -> int
  val pthread_mutex_lock : pthread_mutex_t -> int
  val pthread_mutex_unlock : pthread_mutex_t -> int
  val pthread_cond_init : pthread_cond_t * unit ptr -> int
  val pthread_cond_wait : pthread_cond_t * pthread_mutex_t -> int
  val pthread_cond_signal : pthread_cond_t -> int
  val create : (unit ptr -> unit ptr) -> pthread_t
end