Branch: Tag:

2021-09-28

2021-09-28 14:23:06 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Runtime: Added LOW_{BEGIN,END}_CYCLIC().

43:    return h & (CYCLIC_HASH_SIZE-1);   }    - static void low_unlink_cyclic(CYCLIC *c) + void low_unlink_cyclic(CYCLIC *c)   {    size_t h;    CYCLIC **p;
74:    low_unlink_cyclic(c);   }    - PMOD_EXPORT void *begin_cyclic(CYCLIC *c, + void *low_begin_cyclic(CYCLIC *c,    char *id,    void *th,    void *a,
106:       c->next = cyclic_hash[h];    cyclic_hash[h] = c; -  SET_ONERROR(c->onerr, low_unlink_cyclic, c); +    #ifdef CYCLIC_DEBUG    if (!ret) fprintf (stderr, "%s: BEGIN_CYCLIC a=%p b=%p: no cycle\n", id, a, b);   #endif    return ret;   } -  +  + PMOD_EXPORT void *begin_cyclic(CYCLIC *c, +  char *id, +  void *th, +  void *a, +  void *b) + { +  void *ret = low_begin_cyclic(c, id, th, a, b); +  SET_ONERROR(c->onerr, low_unlink_cyclic, c); +  return ret; + }