aboutsummaryrefslogtreecommitdiffstats
path: root/Source/charon/threads/scheduler.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-04-10 08:07:38 +0000
committerMartin Willi <martin@strongswan.org>2006-04-10 08:07:38 +0000
commit5113680f95e522c677cdd37072cfffbdca06831e (patch)
tree973ac57accbc66b042e5307942c6cbbbf4f19579 /Source/charon/threads/scheduler.c
parent6862128151fb78f63685a8da5575783c426d64a7 (diff)
downloadstrongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.bz2
strongswan-5113680f95e522c677cdd37072cfffbdca06831e.tar.xz
- 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
Diffstat (limited to 'Source/charon/threads/scheduler.c')
-rw-r--r--Source/charon/threads/scheduler.c9
1 files changed, 4 insertions, 5 deletions
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 <daemon.h>
#include <definitions.h>
-#include <utils/allocator.h>
#include <utils/logger_manager.h>
#include <queues/job_queue.h>
@@ -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");
}