modus
Menu
On this page

The entry plan_applier

The applier of the machine test of the plan of principal 0 across a restart. It applies plans of principal 0 through plans.apply and reads the decision of the principal with plans.apply_poll; the tool answers each dialog of the trusted display with the keys of a principal. The refusals come first, each with its call status and its error record, and each leaves generation 0 current:

  1. 1. a Plan_Expected that names a current plan that does not exist: refused at once, with no dialog;
  2. 2. a plan that the principal refuses: Enter while the focus is on Refuse;
  3. 3. a holder of Settings whose hash names no module of the boot image, which the principal accepts: the root service refuses its roles, so nothing commits;
  4. 4. a holder that is a module of the image and does not fill the contract of Settings (generic_source): the same.

The last case is the plan that commits: settings_stand_in as the holder of Settings, accepted, generation 1.

The display takes a decision only PLAN_DISPLAY_ARM_MILLISECONDS after it showed the difference: this process writes one line for each dialog when that time passed after the answer of apply, which came after the dialog showed, so a key that the tool presses after that line counts. The host tests of the dialog (internal:compositor/bar) prove that a key before that time is no act; a machine test cannot place a key before it with no bound on the speed of the host.

Start: start("plan_applier") in the console of principal 0. What a reader sees: no window; one line for each case, then "plan_applier: the principal accepted the plan: generation 1, ..." or a line "plan_applier: WRONG: ...". It stops itself with Done, or Failed after a WRONG line.

See: Declarations: The plan of principal 0 at the start in the repository

plan_applier module with an entry

Hash
7b57316d816bed739f9ad728f0a936237a4134180163cbdfb77ab149e5d72d1d
Size
77824 bytes
Exports
0
Imports
0
Imported by
0
License
MIT

The applier of the machine test of the plan of principal 0 across a restart

FactValue
KindModules with an entry
Sourcesrc/modules/tests/plan_applier
Boot imageno: not in the boot image
Build settingsnone: the defaults of the source
Importsnone
Imported bynone

Neighbours

It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.

Exports

ExportWhat it does
entry()

entry

entry()
Form
The entry of the module: one parameter, an address, fixed by the contract.
Source
src/modules/tests/plan_applier/main.odin:184

Read from the source of the module, as the build reads it to describe the exports (tools/modustool/build/describe.odin).

What the root service gives it

WhatValueAs the root service says
GrantsThe applier of the test of the plan of principal 0: a connection to the holder of Plans and to no other service, the boot image for the description of its exports and for the hash of the holder that the plan names, and the grant to act for the principal, which plans.apply asks.
Other terms of its start grant setcallable = {0 = "plans"}
Budget that it asks for
  • the least budget
No MODULE_BUDGET in its source: it asks for the least budget.

The start grant set is read from start_grant_sets in src/modules/system/root/start_grant_sets.odin. The stated budget is read from the constant MODULE_BUDGET of the source of the module; the build adds the counted parts and writes the sum in the module (tools/modustool/build/budget_count.odin); the root service accepts it up to the largest budget of a process, and adds the limits of processor time and of log records (src/modules/system/root/budgets.odin).

Error_Record struct

A struct of the package errors: 56 bytes, aligned on 8 bytes, 0 bytes of padding. The error record: what a call that failed says about why, as seven integers.

  • kindi6408 bytes
  • uniti6488 bytes
  • operationi64168 bytes
  • argumenti64248 bytes
  • valuei64328 bytes
  • limiti64408 bytes
  • foundi64488 bytes

apply procedure of the package plans_service

apply :: proc "c" (plan_name: ^string, rows: ^system.Table_To_Read(pr.Plan_Entry_Row), expected: ^pr.Plan_Expected, error: ^errors.) -> i64

apply shows the difference between the plan of rows and the current plan.

src/modules/system/plans/exports.odin:174

apply_poll procedure of the package plans_service

apply_poll :: proc "c" (ticket: i64, result: ^[]pr.Plan_Generation_Row, error: ^errors.) -> i64

apply_poll reads the decision of the principal on the apply of a ticket.

src/modules/system/plans/exports.odin:216