Merge branch 'master' of ssh://gitlab.os-k.eu:222/gem-graph-team/gem-graph-server
This commit is contained in:
commit
4982a214da
|
@ -51,6 +51,10 @@ struct {
|
||||||
pthread_t *id;
|
pthread_t *id;
|
||||||
} typedef SchedulerParams_t;
|
} typedef SchedulerParams_t;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
pthread_t *id;
|
||||||
|
} typedef WorkerParams_t;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Local threads
|
// Local threads
|
||||||
//
|
//
|
||||||
|
|
|
@ -40,10 +40,9 @@ pthread_t *WorkerInit(SchedulerParams_t *parameters)
|
||||||
// -------------------------------------------------------------------------- //
|
// -------------------------------------------------------------------------- //
|
||||||
static void *LittleWorker(void *params)
|
static void *LittleWorker(void *params)
|
||||||
{
|
{
|
||||||
SchedulerParams_t *parameters = (SchedulerParams_t*) params;
|
WorkerParams_t *parameters = (WorkerParams_t*) params;
|
||||||
int a = 4;
|
int a = 4;
|
||||||
|
|
||||||
|
|
||||||
for (int i = 0; i < 45000; i++) {
|
for (int i = 0; i < 45000; i++) {
|
||||||
for (int j = i; j < 45000; j++) {
|
for (int j = i; j < 45000; j++) {
|
||||||
a = (a + (long)parameters->id) * i * j;
|
a = (a + (long)parameters->id) * i * j;
|
||||||
|
|
|
@ -42,11 +42,8 @@ pthread_t *SchedInit(SchedulerParams_t *parameters)
|
||||||
static void *GreatScheduler(void *params)
|
static void *GreatScheduler(void *params)
|
||||||
{
|
{
|
||||||
SchedulerParams_t *parameters = (SchedulerParams_t*) params;
|
SchedulerParams_t *parameters = (SchedulerParams_t*) params;
|
||||||
int a = 4;
|
|
||||||
|
|
||||||
|
printf("Scheduler id %p: I'm alive!\n", parameters->id);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
printf("thread %d\n", a);
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue