Frama-C:
Plug-ins:
Libraries:

Frama-C API - Thread

include Frama_c_kernel.Datatype.S_with_collections
include Frama_c_kernel.Datatype.S
include Frama_c_kernel.Datatype.S_no_copy
val datatype_name : string

Unique name of the datatype.

val datatype_descr : t Frama_c_kernel.Descr.t

Datatype descriptor.

Packed version of the descriptor.

val reprs : t list

List of representants of the descriptor.

val equal : t -> t -> bool
val compare : t -> t -> int

Comparison: same spec than Stdlib.compare.

val hash : t -> int

Hash function: same spec than Hashtbl.hash.

val pretty : Stdlib.Format.formatter -> t -> unit

Pretty print each value in an user-friendly way.

val mem_project : (Frama_c_kernel.Project_skeleton.t -> bool) -> t -> bool

mem_project f x must return true iff there is a value p of type Project.t in x such that f p returns true.

val copy : t -> t

Deep copy: no possible sharing between x and copy x.

module Set : Frama_c_kernel.Datatype.Set with type elt = t
module Map : Frama_c_kernel.Datatype.Map with type key = t
val main : t
val is_main : t -> bool
val id : t -> int
val label : t -> string
val find : int -> t option

spawn al name kf args registers the creation of a thread encountered in Eva analysis, and either add this spawn to an existing thread analysis or create a new thread analysis.

  • parameter al

    the stmt and callstack of the thread creation

  • parameter name

    an optional name often defined by the memory location where the thread identifier will be stored

  • parameter kf

    the entry point for the new thread

  • parameter args

    the list of arguments used for the thread invocation

val is_interrupt_handler : Frama_c_kernel.Cil_types.kernel_function -> bool

is_interrupt_handler kf returns true if kf has been registered as an interrupt handler.

val interrupt_handler : Frama_c_kernel.Cil_types.kernel_function -> t

interrupt_handler kf returns the thread representing the interrupt handler kf.

val interrupt_handlers : unit -> t list

interrupt_handlers () returns the threads representing the registered interrupt handlers.

val register_interrupt_handlers : Frama_c_kernel.Kernel_function.Set.t -> unit

Register a set of functions serving as interrupt handlers.

val reset_state : unit -> unit
val current : unit -> t
val set_current : t -> unit
val entry_point : t -> Frama_c_kernel.Kernel_function.t