UP

See (kernel-logic,hook) if you can. The decongester tool allows the following operations.

DECONGESTER_TOOL(0;==>[loose end]) accepts messages from the kernel. It waits until there is at least one message. During the wait the root of the waiting domain will not be swapped out, i.e. its hook can never be unprepared. The hoard is increased by the number of unhook messages accepted {therefore N does not change}.

DECONGESTER_TOOL(1;EK==>;) does a fork jump to a restart key EK and decreases the hoard by one {therefore N does not change}. [Maybe this should take up to 3 resume keys.] Fine print: If the first and fourth key arguments are the same the effect is unpredictable.

DECONGESTER_TOOL(2,cda,x;EK==>;) puts the domain referred to by resume key EK at the tail of the internal queue of stallees for the node with the indicated cda, and decreases the hoard by one {therefore N does not change}. The external queue bit is cleared if x is zero. [Maybe this should take up to 3 resume keys.]

DECONGESTER_TOOL(3,m;==>;) decreases the hoard by m {i.e., adds m to N}.

DECONGESTER_TOOL(4,m;==>p;) sets p to min(N,m), then increases the hoard by p {i.e., subtracts p from N}.