The count of allowed threads must be the real
count of threads started.
Change-Id: Iaefc9fa4368042d6db45ed3333f9591da027b2f0
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
me->lowered = 0;
me->waits = 0;
me->upper = current;
me->lowered = 0;
me->waits = 0;
me->upper = current;
sig_monitor_init_timeouts();
sig_monitor_init_timeouts();
- current = (struct thread*)me;
me->next = threads;
threads = (struct thread*)me;
me->next = threads;
threads = (struct thread*)me;
+ current = (struct thread*)me;
NOTICE("job thread starting %d(/%d) %s", started, allowed, me->upper ? "child" : "parent");
NOTICE("job thread starting %d(/%d) %s", started, allowed, me->upper ? "child" : "parent");
NOTICE("job thread stoping %d(/%d) %s", started, allowed, me->upper ? "child" : "parent");
/* unlink the current thread and cleanup */
NOTICE("job thread stoping %d(/%d) %s", started, allowed, me->upper ? "child" : "parent");
/* unlink the current thread and cleanup */
prv = &threads;
while (*prv != me)
prv = &(*prv)->next;
*prv = me->next;
current = me->upper;
prv = &threads;
while (*prv != me)
prv = &(*prv)->next;
*prv = me->next;
current = me->upper;
sig_monitor_clean_timeouts();
sig_monitor_clean_timeouts();