Branch: Tag:

2014-08-26

2014-08-26 09:31:10 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Cyclic: Improved thread-awareness.

Don't use CYCLICs originating from other threads, as there's
no way of knowing whether they are valid or not.

Also default the local cyclic ret value to the existing cyclic ret
if found.

78:       for(p=cyclic_hash[h];p;p=p->next)    { -  if(a == p->a && b==p->b && id==p->id) +  if(a == p->a && b==p->b && id==p->id && th==p->th)    {   #ifdef CYCLIC_DEBUG    fprintf (stderr, "%s: BEGIN_CYCLIC a=%p b=%p: found cycle\n", id, a, b);   #endif -  ret = p->ret; +  c->ret = ret = p->ret;    break;    }    }