Skip to main content

PREEMPTION_RECORD_FORMAT

Constant PREEMPTION_RECORD_FORMAT 

Source
pub const PREEMPTION_RECORD_FORMAT: u32 = SWITCH_IN_CHARGE_FORMAT; // 3u32
Expand description

The newest preemption-record format this Hermit writes and reads (PreemptionRecord::format_version), one counter for every format change: a record of format N has every property of the formats before it.

  • Format 1 has no version field: every record written before the field existed.
  • Format 2 (TIME_SKIPS_FORMAT) lists every jump of global time its run made (time_skips, absent when there was none).
  • Format 3 (SWITCH_IN_CHARGE_FORMAT) was written by a run that charged every stretch of guest code a turn, so its replay charges a replayed switch-in under which guest code runs.

A record of a newer format is refused (PreemptionRecord::validate_format).