On Wed, Jun 11, 2008 at 08:31:45AM -0700, Andrew Gallatin wrote:
> Just that that the second snippet seems to be rather
> recursive (this->mp = this->mp->b_cont) and it seems
> to work, and is a nice alternative to enumerating
> all the potential chains as was suggested.

Romantic notion, but no, it's not.  Your enabling control blocks (ECBs)
are not reevaluated after the action is taken -- when you set this->mp to
be this->mp->b_cont, it doesn't mean that the predicate is reevaluated and
the action re-taken.  (After all, were the predicate reevaulated, just having
a predicate that always evaluates to true would cause an infinite loop.)
So you will have to manually unroll any such iteration that you wish to
have -- which can still be made quite effective if the number of elements
tends to be small...

        - Bryan

--------------------------------------------------------------------------
Bryan Cantrill, Sun Microsystems Fishworks.       http://blogs.sun.com/bmc
_______________________________________________
dtrace-discuss mailing list
[email protected]

Reply via email to