Richard Harter’s World
Site map
December 2010
Mathcomp
San Language
email

November 21, 2010: dfe_engine revisions

This is a summary of the changes to the san_engine code in the November 21, 2010 release. The code is not under revision control, but this release is archived at http://richardhartersworld.com/test/~cri_e/archives/dfecode20101121/. None-the-less it is usable by the adventurous.


Testing under ubuntu turned up some minor bugs. The fixes are list below.

  1. A static variable, init_object_ref, has been added with the value {0,0}. It is used to initialize object references.

  2. In function connect a line d.link=0 was added .

  3. Two minor bugs in getspace.c were fixed. Stderr should not be used in initialization statements; case 0 in detach_node was missing an else.

    When a packet is being received from outside the nest it must be copied in with the storage coming from the current xpool. The copy is done in imprec_xfer.

  4. The handling of blocking and unblocking of inports has been changed. The new code is more robust and corrrectly handles cases that hadn’t been originally considered. The new schema runs as follows:

    Two lists are added to the nest structure, blocked and deblocked, List blocked holds the addresses of all blocked inports that have undelivered packets. List deblocked holds the addresses of all unblocked inports with undelivered packets. The inport_s struct has two fields used for handling blocked input, blocked (a flag) and unde (a pointer to a struct holding the blocked deliveries queue and the associated storage pool header). The udne pointer is null when there is no queue.

    Inports are blocked with the dfe_block function. The sole action taken is to set the blocked flag true; the unde pointer remains null. When input for a blocked inport first appears the unde struct is created, the input packet is added to the unde queue, and the inport address is added to the blocked list. Subsequent inputs for the inport are added to the blocked inputs queue.

    Inports are unblocked with the dfe_unblock function. The blocked flag is set false. If the inport is present in the blocked list it is moved to the deblocked list.

    The scheduler switches to the drain_loop state whenever there is content in the deblocked list. This state has a double loop. The outer loop processes the inports in the deblocked list. The inner loop processes the inport’s blocked inputs queue.



This page was last updated November 21, 2010.

Richard Harter’s World
Site map
December 2010
Mathcomp
San Language
email