← All compilation units

Flyology_Bench.Host_Control

Description

Optional host controls for reducing benchmark placement noise.

Pin_Current_Thread

function Pin_Current_Thread (CPU : Natural) return Placement_Strength

Pin or affinity-tag the calling native thread. Linux applies strict CPU affinity; Darwin applies a scheduler affinity tag and is advisory. Call this from the thread that will execute the benchmark.

Parameters
CPU

Zero-based logical CPU or Darwin affinity tag index.

Return value

Strength of the applied platform policy.

Raised exceptions
Program_Error

If the platform rejects the request.

Placement_Strength

type Placement_Strength is (Advisory, Strict);

Strength of the placement policy applied by the host.

Enumeration literals
Advisory

Placement is a scheduler hint rather than a hard binding.

Strict

The calling thread is bound to the selected logical CPU.