From bf35b1c705e0c7f811fb04d4a52b3e8d2138e249 Mon Sep 17 00:00:00 2001 From: Adrien Bourmault Date: Fri, 11 Jun 2021 14:22:56 +0200 Subject: [PATCH] Cleanup --- include/localworker.h | 7 +++++-- include/scheduler.h | 3 +++ src/scheduler.c | 6 +----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/include/localworker.h b/include/localworker.h index c491b26..e2124c6 100644 --- a/include/localworker.h +++ b/include/localworker.h @@ -23,10 +23,13 @@ #include "../include/base.h" #endif +// -------------------------------------------------------------------------- // +// Worker init function // +// -------------------------------------------------------------------------- // pthread_t *WorkerInit(SchedulerParams_t *parameters); // -------------------------------------------------------------------------- // -// Scheduler destructor function // +// Worker destructor function // // -------------------------------------------------------------------------- // static inline int WorkerDestroy(pthread_t *schedThread) { @@ -35,7 +38,7 @@ static inline int WorkerDestroy(pthread_t *schedThread) } // -------------------------------------------------------------------------- // -// Scheduler wait function // +// Worker wait function // // -------------------------------------------------------------------------- // static inline void WorkerWait(pthread_t *schedThread) { diff --git a/include/scheduler.h b/include/scheduler.h index a54fa76..5061829 100644 --- a/include/scheduler.h +++ b/include/scheduler.h @@ -23,6 +23,9 @@ #include "../include/base.h" #endif +// -------------------------------------------------------------------------- // +// Scheduler init function // +// -------------------------------------------------------------------------- // pthread_t *SchedInit(SchedulerParams_t *parameters); // -------------------------------------------------------------------------- // diff --git a/src/scheduler.c b/src/scheduler.c index cd91c75..43c8d57 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -45,11 +45,7 @@ static void *GreatScheduler(void *params) int a = 4; - for (int i = 0; i < 45000; i++) { - for (int j = i; j < 45000; j++) { - a = (a + (long)parameters->id) * i * j; - } - } + printf("thread %d\n", a); return NULL;