WIP: (BUG) model run/load/create + typos corrected
This commit is contained in:
parent
aa4bd4478c
commit
e0a7cfe0b3
|
@ -26,25 +26,20 @@
|
|||
// -------------------------------------------------------------------------- //
|
||||
// Supervisor init function //
|
||||
// -------------------------------------------------------------------------- //
|
||||
void SupervisorInit(Scheduler_t *scheduler);
|
||||
void SupervisorInit(Supervisor_t *supervisor);
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Supervisor destructor function //
|
||||
// -------------------------------------------------------------------------- //
|
||||
static inline void SupervisorDestroy(Scheduler_t *scheduler)
|
||||
static inline void SupervisorDestroy(Supervisor_t *supervisor)
|
||||
{
|
||||
free(scheduler->id);
|
||||
free(scheduler->globalDrawingSpace->space);
|
||||
free(scheduler->globalDrawingSpace);
|
||||
|
||||
free(scheduler->arrowArray->array);
|
||||
free(scheduler->arrowArray);
|
||||
free(supervisor->id);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Supervisor wait function //
|
||||
// -------------------------------------------------------------------------- //
|
||||
static inline void SupervisorWait(Scheduler_t *scheduler)
|
||||
static inline void SupervisorWait(Supervisor_t *supervisor)
|
||||
{
|
||||
pthread_join(*scheduler->id, NULL);
|
||||
pthread_join(*supervisor->id, NULL);
|
||||
}
|
||||
|
|
|
@ -30,12 +30,12 @@ static void *serverMain(void *server);
|
|||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Scheduler init function //
|
||||
// Server init function //
|
||||
// -------------------------------------------------------------------------- //
|
||||
void ServerInit(Server_t *scheduler)
|
||||
void ServerInit(Server_t *server)
|
||||
{
|
||||
scheduler->id = (pthread_t*) calloc(1, sizeof(pthread_t));
|
||||
pthread_create(scheduler->id, NULL, serverMain, scheduler);
|
||||
server->id = (pthread_t*) calloc(1, sizeof(pthread_t));
|
||||
pthread_create(server->id, NULL, serverMain, server);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
|
|
@ -21,23 +21,23 @@
|
|||
|
||||
#include "../include/base.h"
|
||||
|
||||
static void *supervisorMain(void *scheduler);
|
||||
static void *supervisorMain(void *supervisor);
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Supervisor init function //
|
||||
// -------------------------------------------------------------------------- //
|
||||
void SupervisorInit(Scheduler_t *scheduler)
|
||||
void SupervisorInit(Supervisor_t *supervisor)
|
||||
{
|
||||
scheduler->id = (pthread_t*) calloc(1, sizeof(pthread_t));
|
||||
pthread_create(scheduler->id, NULL, supervisorMain, scheduler);
|
||||
supervisor->id = (pthread_t*) calloc(1, sizeof(pthread_t));
|
||||
pthread_create(supervisor->id, NULL, supervisorMain, supervisor);
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------------- //
|
||||
// Supervisor thread main function //
|
||||
// -------------------------------------------------------------------------- //
|
||||
static void *supervisorMain(void *scheduler)
|
||||
static void *supervisorMain(void *supervisor)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue