File: cpu.ml

package info (click to toggle)
ocaml-cpu 2.0.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 300 kB
  • sloc: ansic: 59; makefile: 22; sh: 4; ml: 2
file content (9 lines) | stat: -rw-r--r-- 324 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
(* uses the native affinity interface to
   declare that the current process should be
   attached to core number n *)

(** [numcores ()] get the number of processors online. *)
external numcores: unit -> int = "numcores"

(** [setcore i] pin current process to core number [i]. *)
external setcore: int -> unit = "setcore"