cleanup inlines

This commit is contained in:
Adrien Bourmault 2021-06-11 13:56:52 +02:00
parent 61ceb36028
commit cbfcdb389f
No known key found for this signature in database
GPG Key ID: 6EB408FE0ACEC664
3 changed files with 16 additions and 20 deletions

View File

@ -24,7 +24,7 @@ LDFLAGS= -lc -lpthread
BINDIR=bin
SRCDIR=src
DEBDIR=debian
OBJ=$(BINDIR)/scheduler.o $(BINDIR)/server.o $(BINDIR)/localthread.o $(BINDIR)/main.o
OBJ=$(BINDIR)/scheduler.o $(BINDIR)/server.o $(BINDIR)/localworker.o $(BINDIR)/main.o
.DEFAULT_GOAL:= all
.PHONY: all clean deb

View File

@ -25,6 +25,19 @@
pthread_t *SchedInit(SchedulerParams_t *parameters);
int SchedWait(pthread_t *schedThread);
// -------------------------------------------------------------------------- //
// Scheduler destructor function //
// -------------------------------------------------------------------------- //
static inline int SchedDestroy(pthread_t *schedThread)
{
free(schedThread);
return 0;
}
int SchedDestroy(pthread_t *schedThread);
// -------------------------------------------------------------------------- //
// Scheduler wait function //
// -------------------------------------------------------------------------- //
static inline void SchedWait(pthread_t *schedThread)
{
pthread_join(*schedThread, NULL);
}

View File

@ -36,23 +36,6 @@ pthread_t *SchedInit(SchedulerParams_t *parameters)
return parameters->id;
}
// -------------------------------------------------------------------------- //
// Scheduler destructor function //
// -------------------------------------------------------------------------- //
int SchedDestroy(pthread_t *schedThread)
{
free(schedThread);
return 0;
}
// -------------------------------------------------------------------------- //
// Scheduler wait function //
// -------------------------------------------------------------------------- //
void SchedWait(pthread_t *schedThread)
{
pthread_join(*schedThread, NULL);
}
// -------------------------------------------------------------------------- //
// Scheduler thread main function //
// -------------------------------------------------------------------------- //