cleanup inlines
This commit is contained in:
parent
61ceb36028
commit
cbfcdb389f
2
Makefile
2
Makefile
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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 //
|
||||
// -------------------------------------------------------------------------- //
|
||||
|
|
Loading…
Reference in New Issue