The entry requests_reader
The slow reader of the test of fan-out and the pace . The test module requests_pace starts it, then starts server with a wiring list whose rows wire server.requests to each record input of this process, each with a ring of PACE_RING_CAPACITY compartments:
held, of the pace Always_Holds_Writer: a full ring holds the server;gapped, of the pace Never_Holds_Writer: a full ring refuses the record for this reader alone, which then reads a gap record.
It reads in three phases, each opened by a state of its rings and never by a time. The tool sends the requests in three parts: C, then C after the line "phase 1 read", then the rest after "phase 2 read". So no request is in flight while this reader drains a ring, and the counts are exact by construction:
- 1. It reads nothing until
heldis full and the server waits for room in it. Both rings then hold the joined record of 0 and the records 0 to capacity - 2. It readsheldwhole: the server goes on, andgapped, still full, refuses each next record. - 2. It reads nothing until
heldis full again and the server waits: the records capacity - 1 to 2 capacity - 2 are inheld, andgappedrefused each of them. It readsgappedwhole, thenheldwhole. - 3. The server writes the next record:
gappedtakes first a gap record of exactly capacity records from the serial capacity - 1, then the record. Both rings hold the rest of the stream, which ends when the asker stops the server. It reads each ring to its end word.
Start: by requests_pace only. What a reader sees: no window; one line for each record input "requests_reader: ...: as it must", or a line "requests_reader: WRONG: ...". It stops itself with the outcome Done, or Failed after a WRONG line.
requests_reader module with an entry
- Hash
0b3442a261b2da79a21d05dd3f7176e762e2ed91c43c5a2aaf052853f4426ef1- Size
65536 bytes- Exports
0- Imports
0- Imported by
0- License
- MIT
The slow reader of the test of fan-out and the pace
| Fact | Value |
|---|---|
| Kind | Modules with an entry |
| Source | src/modules/tests/requests_reader |
| Boot image | yes: in the boot image, 65536 bytes in this build |
| Build settings | none: the defaults of the source |
| Imports | none |
| Imported by | none |
Neighbours
It imports no module, and no module imports it. The module graph shows it with the other modules that have no edge.
Exports
| Export | What it does |
|---|---|
entry() |
entry
entry()
- Form
- The entry of the module: one parameter, an address, fixed by the contract.
src/modules/tests/requests_reader/main.odin:144
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
| What | Value | As the root service says |
|---|---|---|
| Grants | none | Its slow reader: its two ends come in its wiring ring before the first instruction of server, and it needs no grant. |
| Other terms of its start grant set | none | |
| Budget that it asks for |
| 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).
requests global variable of the package server
requests: system.Record_Output(Access_Record)
One request that the server answered.
