← All compilation units

Flyology.Dormancy

Description

Controls whether the calling task permits best-effort stack reclamation.

Cold_Advice_Supported

function Cold_Advice_Supported return Boolean

Report whether the host exposes nondestructive cold-page advice. This query starts no event loop. A supported call remains best effort and can be rejected for an individual mapping.

Return value

True when cold-page advice is available in the host build

Current_Policy

function Current_Policy return Policy

Return the calling task's policy. Native tasks report Prompt.

Return value

Current dormancy policy

Dormancy_Error

Dormancy_Error : exception;

Raised when a dormancy request is invalid for the calling task.

Pageout_Advice_Supported

function Pageout_Advice_Supported return Boolean

Report whether the host exposes nondestructive page-out advice. The query starts no event loop. The kernel may ignore individual pages, and backing is determined by host swap, zswap, or zram configuration.

Return value

True when page-out advice is available in the running kernel

Policy

type Policy is (Prompt, Reclaimable, Page_Out);

Wake-latency contract for the calling task.

Enumeration literals
Prompt

Do not proactively mark the task stack cold

Reclaimable

Permit cold advice during sufficiently long waits

Page_Out

Ask the kernel to reclaim applicable stack pages now

Set_Policy

procedure Set_Policy (Value : Policy; Minimum_Wait : Duration := 1.0)

Set the calling task's dormancy policy. Reclaimable marks applicable pages cold; Page_Out requests immediate kernel reclamation. Both apply only to a lightweight task waiting solely on a timer whose remaining delay is at least Minimum_Wait. Prompt is the default and is accepted as a no-op by native tasks. The policy is independent of Ada priority.

Parameters
Value

New wake-latency policy

Minimum_Wait

Minimum remaining timer delay before cold advice

Raised exceptions
Dormancy_Error

Value is not Prompt in a native task or the interval is negative or too large for the runtime ABI