Merge branch 'master' of ssh://gitlab.os-k.eu:222/gem-graph-team/gem-graph-server
This commit is contained in:
commit
debbc40432
|
@ -23,10 +23,13 @@
|
||||||
#include "../include/base.h"
|
#include "../include/base.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------- //
|
||||||
|
// Worker init function //
|
||||||
|
// -------------------------------------------------------------------------- //
|
||||||
pthread_t *WorkerInit(SchedulerParams_t *parameters);
|
pthread_t *WorkerInit(SchedulerParams_t *parameters);
|
||||||
|
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
// Scheduler destructor function //
|
// Worker destructor function //
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
static inline int WorkerDestroy(pthread_t *schedThread)
|
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)
|
static inline void WorkerWait(pthread_t *schedThread)
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,6 +23,9 @@
|
||||||
#include "../include/base.h"
|
#include "../include/base.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// -------------------------------------------------------------------------- //
|
||||||
|
// Scheduler init function //
|
||||||
|
// -------------------------------------------------------------------------- //
|
||||||
pthread_t *SchedInit(SchedulerParams_t *parameters);
|
pthread_t *SchedInit(SchedulerParams_t *parameters);
|
||||||
|
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
|
|
|
@ -45,11 +45,7 @@ static void *GreatScheduler(void *params)
|
||||||
int a = 4;
|
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);
|
printf("thread %d\n", a);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue