From 5113680f95e522c677cdd37072cfffbdca06831e Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Mon, 10 Apr 2006 08:07:38 +0000 Subject: - split up in libstrong, charon, stroke, testing done - new leak detective with malloc hook in library - useable, but needs improvements - logger_manager has now a single instance per library - allows use of loggers from any linking prog - a LOT of other things --- Source/charon/threads/scheduler.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Source/charon/threads/scheduler.c') diff --git a/Source/charon/threads/scheduler.c b/Source/charon/threads/scheduler.c index 8750cdae9..47c5d6fb9 100644 --- a/Source/charon/threads/scheduler.c +++ b/Source/charon/threads/scheduler.c @@ -27,7 +27,6 @@ #include #include -#include #include #include @@ -98,7 +97,7 @@ static void destroy(private_scheduler_t *this) pthread_join(this->assigned_thread, NULL); this->logger->log(this->logger, CONTROL | LEVEL1, "Scheduler thread terminated"); - allocator_free(this); + free(this); } /* @@ -106,18 +105,18 @@ static void destroy(private_scheduler_t *this) */ scheduler_t * scheduler_create() { - private_scheduler_t *this = allocator_alloc_thing(private_scheduler_t); + private_scheduler_t *this = malloc_thing(private_scheduler_t); this->public.destroy = (void(*)(scheduler_t*)) destroy; this->get_events = get_events; - this->logger = charon->logger_manager->get_logger(charon->logger_manager, SCHEDULER); + this->logger = logger_manager->get_logger(logger_manager, SCHEDULER); if (pthread_create(&(this->assigned_thread), NULL, (void*(*)(void*))this->get_events, this) != 0) { /* thread could not be created */ this->logger->log(this->logger, ERROR, "Scheduler thread could not be created!"); - allocator_free(this); + free(this); charon->kill(charon, "Unable to create scheduler thread"); } -- cgit v1.2.3