I would have seen *before* I commited anything. So, include isc/thread.h,
isc/mutex.h and isc/condition.h even if ISC_PLATFORM_USETHREADS is not defined.
(What caused me to bother with this at all was a problem that I resolved
a few days ago by fixing configure ... though now that I think about it,
that probably means there is some other latent problem with inconsistent
definitions that could maybe be handled better. I'll look into it more
later, AFTER vacation.)
Mostly, several functions that take pointers as arguments, almost
always char * pointers, had those pointers qualified with "const".
Those that returned pointers to previously const-qualified arguments
had their return values qualified as const. Some structure members
were qualified as const to retain that attribute from the variables
from which they were assigned.
The macro DE_CONST was added to isc/util.h to deal with a handful of very
special places where something is qualified as const but really needs to have
its const qualifier removed.
Also cleaned up a few places where variable names clashed with reserved
identifiers. (Which mostly works fine, but strictly speaking is undefined
by the standard.)
Minor other ISC style cleanups.
Cleanup of redundant/useless header file inclusion.
ISC style lint, primarily for function declarations and standalone
comments -- ie, those that appear on a line without any code, which
should be written as follows:
/*
* This is a comment.
*/
Tasks now terminate when
Any shutdown events have been posted
There are no references
The event queue is empty
If a task has no references and the event queue
is empty, then a shutdown will be triggered if
it hasn't been already.
allowdone and allowsend are gone
sending events can no longer fail
and its event queue is empty.
The DONEOK flag is forced to true if there are no references to a task,
its event queue is empty, and it is shutting down.
Add isc_task_unsend() and isc_task_unsendrange().
Add isc_task_sendanddetach().
Event tags are now void *.
Code cleanups.
Various shutdown bug fixes.
Make tracing messages prettier.
When isc_task_shutdown() is called, any shutdown events are posted
and the task goes into shutting down state. isc_task_onshutdown()
may no longer be called.
If the task allows transition to the done state (the default), then
as soon as the task's event queue is empty the task will enter the
done state. Once the done state has been entered, events may no
longer be posted (regardless of the allowsend state). If transition
to the done state is not allowed, then the task will continue to
exist and be able to receive events.
Moved event support to event.[ch].
The final state of a task is now called "done" not "shutdown".
Created a flags variable instead of having separate booleans.
Added isc_task_allowdone() and isc_task_purgerange().
Minor tracing fixes.