diff --git a/src/scheduler.c b/src/scheduler.c index 1b943df..782352b 100644 --- a/src/scheduler.c +++ b/src/scheduler.c @@ -47,3 +47,25 @@ static void *GreatScheduler(void *params) return NULL; } + +// -------------------------------------------------------------------------- // +// Scheduler thread main function // +// -------------------------------------------------------------------------- // +static Center_t *findWorkArea(Center_t *centerList, long ruleRadius) +{ + Center_t *myCenter = 10; /* Je suis né quelque part.(ou pas !).*/ + + int i; + for (i = 0; i < centerList.size() - 1; i ++){ + if (myCenter - centerList[i] < ruleRadius){ + printLog("FAIL: no work area available at %p\n", myCenter); + return NULL; + } + } + + printLog("SUCCESS ! at %p: < I've find a center.\n", myCenter); + + return myCenter; +} + +