August 31 2009: san_engine revisions
This is a summary of the changes to the san_engine code in the August 31
release. The code is not under revision control, but previous the previous release
is archived at
However it is usable by the adventurous.
Most of the changes were made to improve performance and to reduce memory footprint.
Some were cosmetic, and some anticpate a multi-nest environment.
Three new suffixes, _n, _sz, and _e were added. The first two are for resizable arrays, and the _e suffix
is for enumerations.
The emission to delivery copy is now shallow. The emission contains the
delivery information (which may be stale). The old code did a deep copy
from the emission to the delivery; the new code does a shallow copy. This
reduces the memory and execution time footprints.
Usage of the listpkg package has been eliminated. Internal linkage is used instead.
This change reduced the memory and execution time footprints.
The xpool system was reworked yet again. The xpools are now linked. A new routine,
new_xpool, was added. It and only it handles xpool creation and deletion. It scans
the list of xpools and deletes the empty ones. Previous code had checks at all places
where the count was decremented; when it went to zero the pool was deleted. The new
code is cleaner.
The next/current scheme was replaced by emissions/deliveries. User code generates emissions;
update_deliveries generates deliveries.
A mode field was added to the check_s structure. Three modes are defined, single_step,
single_cycle, and free_running. The scheduler was restructed to have a switch within the
master cycle loop. The switch states are the initial loop code, delivery processing,
source processing, and the update section. The delivery and source loops are replaced by case
code that only does one user event at a time. The loop indices are stored in nest_s and
are updated in each pass. The state is advanced when the loop terminates.
This change was made so as to permit multiple nests that potentially reside on different
Open_sesame now returns a struct called, appropriately enough, sesame_s. This gets rid of a
bunch of unnecessary declarations and lays the groundwork for converting all API functions to wrappers.
I'm adopting a policy of logging updates to the code in the revisions section. However the section will
only include changes made since the last release.
This page was last updated August 31, 2009.