stuck-waitfor-destruct
|
Last change
on this file since 79a8c2a was 9d3dc40, checked in by Michael Brooks <mlbrooks@…>, 3 months ago |
|
Various changes motivated by improving CFA score on len-1 queues.
No such CFA score improvement achieved. Each change helped only on stripped-down, "try to isolate an important factor" tests. Generally, the changes are benign refactorings. (Results substantiating "don't hurt" are forthcoming.)
Libcfa changes are
- move a read action from between the memory breaks to before them
- make the memory breaks conditionally excluded (default included, as before)
Harness changes are
- add width, a compiled-in number of lists to use in round-robin order; defaults to 1, which is what was happening all along
- make the analysis scripts tolerate (so far, ignore) the width column
- rename CLI arg NumNodes to Length (now NumNodes is Length * Width)
- factor core testing loops into helper function
runtest
- switch to signal-based termination (and add uC++ work-around)
- put "iterator threading" into ITERS_SAVE, joining preexisting "save iter into elem's self ref"; make iterator threading conditional on iterators-active
- disable insertion loop counter and obs_*-variable declarations (and thus writes) when observation disabled
- generalize observation to work on multiple lists
- make observation and assertion-check-enabled mode work on stripped CFA list implementations like tagging-disabled
- through this observation, ensure correctness of multi-list versions
|
-
Property mode
set to
100644
|
|
File size:
974 bytes
|
| Line | |
|---|
| 1 | #include "proglang.h"
|
|---|
| 2 | #include <stdbool.h>
|
|---|
| 3 | #include <stddef.h>
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 | MAYBE_EXTERN_C (
|
|---|
| 7 |
|
|---|
| 8 | // driver.c defines
|
|---|
| 9 |
|
|---|
| 10 | extern enum bobs_op_movement_t { stack, queue } bobs_op_movement;
|
|---|
| 11 | extern enum bobs_op_polarity_t { insfirst, inslast } bobs_op_polarity;
|
|---|
| 12 |
|
|---|
| 13 | void bobs_seek(size_t);
|
|---|
| 14 | void bobs_moveNext();
|
|---|
| 15 | void bobs_movePrev();
|
|---|
| 16 | bool bobs_hasCurrent();
|
|---|
| 17 | void * bobs_getCurrentLoc();
|
|---|
| 18 | size_t bobs_getCurrentVal();
|
|---|
| 19 |
|
|---|
| 20 | extern volatile size_t bobs_ops_completed;
|
|---|
| 21 | extern volatile size_t bobs_prog_inserting;
|
|---|
| 22 | extern volatile size_t bobs_prog_removing;
|
|---|
| 23 | extern volatile size_t bobs_prog_removing_end;
|
|---|
| 24 | extern volatile size_t bobs_prog_rollover_flag;
|
|---|
| 25 | extern volatile size_t const * bobs_prog_rem_pos;
|
|---|
| 26 |
|
|---|
| 27 | // signed values allows representating empty range as from=0, to=-1
|
|---|
| 28 | ptrdiff_t bobs_first_valid();
|
|---|
| 29 | ptrdiff_t bobs_last_valid();
|
|---|
| 30 |
|
|---|
| 31 | // observation.c defines
|
|---|
| 32 |
|
|---|
| 33 | void bobs_init(size_t NumNodes);
|
|---|
| 34 | void bobs_report(void);
|
|---|
| 35 | )
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.