package janestreet_cpuid

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

On Intel CPUs the leaf retrieved when EAX is set to 0x1 contains processor model information as well as some basic features about the processor. Typically if you're checking a flag in this section it's probably available on every machine that we run on (our machines tend towards modernity) but good on you for checking!

module Eax : sig ... end

This information can be used to build a unique identifier for a given processor, which can be useful for any pre-computed data which you need to index into based on what machine it's running on.

module Ebx : sig ... end

This is the only field in the CPUID which changes when called multiple times. The initial_apic_id field changes based on which core the process is currently running on. *

module Ecx_flags : sig ... end
module Edx_flags : sig ... end
type t = {
  1. eax : Eax.t;
  2. ebx : Ebx.t;
  3. mutable ecx : Ecx_flags.t;
  4. mutable edx : Edx_flags.t;
}
val sexp_of_t : t -> Sexplib0.Sexp.t
val canonical_version_string : t -> string
val retrieve : unit -> t
module For_testing : sig ... end
OCaml

Innovation. Community. Security.