Since we're computing the time after each callback, we might as well
update the time cache (if we're using it) and use monotonic time (if
we've got that).
Though the C standards allow it, it's apparently possible to get MSVC
upset by saying "struct { int field; } (declarator);" instead of
"struct {int field; } declarator;", so let's just not do that.
Bugfix for 3044492
(commit msg by nickm)
Previously, there was no good way to request different kinds of lock
(say, read/write vs writeonly or recursive vs nonrecursive), or for a
lock function to signal failure (which would be important for a
trylock mode).
This patch revises the lock API to be a bit more useful. The older
lock calls are still supported for now.
We also add a debugging mode to catch common errors in using the
locking APIs.
A 'deferred callback' is just a function that we've queued in the
event base. This ability is needed for some mt stuff, and for complex
callback chains. For internal use only.
svn:r1150