6881fda812136efa364537ad49964b509a345bd2 709657 |
|
01-Nov-2008 |
pquerna |
Convert events to have an associated pool.
* server/mpm/simple/simple_types.h
(simple_timer_t): Add Pool and a pointer to the associated simple core.
(simple_core_t): Remove dead timer ring, no recycling of timer events for now.
* server/mpm/simple/simple_event.h: Update register_timer signature with pool.
* server/mpm/simple/simple_event.c
(simple_register_timer): Allocate the event structure out of the pool,
and when this pool is destroyed, unregister the timer.
(simple_timer_run): New util function for running a timer and cleaning up
the pool callbacks.
* server/mpm/simple/simple_core.c
(simple_core_init): Remvoe dead timer ring
* server/mpm/simple/simple_run.c
(simple_main_setup_timers): Pass in pool to register call.
(simple_timer_invoke): Use new simple_timer_run function.
(simple_child_loop): Remove dead timer ring.
* server/mpm/simple/simple_io.c
(simple_io_process): Pass in pool when registering timers. |