SystemC originally provided a type called lambda for building predicate functions that could be registered with the EDS kernel so that the kernel could interpret them when it wished and hence determine when a process was unblocked. .html .par However, they were cumbersome to use. They illustrate some of the issues typical to using a language like C++ for a purpose it was not designed for.
The recommended approach now is just to use spinlocks.
waituntil(mycount.delayed() > 5 && !reset.delayed());is replaced with the simple
do { wait(10, SC_NS); } while(!((mycount > 5 && !reset)));
29: (C) 2012-17, DJ Greaves, University of Cambridge, Computer Laboratory. |