A test fix for the thread cancellation routine.
authorDave West <davew@uncensored.citadel.org>
Thu, 20 Mar 2008 15:39:58 +0000 (15:39 +0000)
committerDave West <davew@uncensored.citadel.org>
Thu, 20 Mar 2008 15:39:58 +0000 (15:39 +0000)
commitda86c17b42459fd5300ba03ca374ff002f477ad7
treeb0e8694641803e13b21f0c23e108082c40a2ea18
parent5f3ab0f280c76dd6061fb2602973608eb17efa60
A test fix for the thread cancellation routine.
We only log situations where we would have cancelled a thread, we don't
actually cancel them.
With this code we should not see cancellation requests during normal
running.
Cancelation requests during normal running were due to threads being
asked to stop when load decreased but the idle thread detection aloud a
thread to be asked to stop just as select gave it a task and made it not
idle.
Now if select gives a thread a job to do and the thread was asked to
stop during the select the thread changes its state back to running and
refuses the stop request. This only happens if the system is NOT
shutting down.
citadel/sysdep.c
citadel/threads.c