Loops
Loops
Posted May 27, 2013 20:52 UTC (Mon) by nix (subscriber, #2304)In reply to: Loops by corbet
Parent article: Ktap — yet another kernel tracer
As long as the integer iteration and table iteration don't contain a way for the current loop value to be changed during the loop, that should be OK. I wonder what happens if you change a table while iterating over it... you *can* make that have defined, consistent, and always-terminating behaviour (I did it in a C hash table once) but it tends to lead to rather complex iterators which I doubt have been implemented here. (In my case, about 40% of the code of the iterator was to deal with the stable-iteration-over-mutation case.)
