Commit 4c6ca41f authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formatting

parent e6952cd2
......@@ -1377,7 +1377,9 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
if (qid >= s->nr_queues) error("Bad computed qid.");
/* If no previous owner, pick a random queue. */
if (qid < 0) qid = rand_r((unsigned int*)pthread_getspecific(s->local_seed_pointer) ) % s->nr_queues;
if (qid < 0)
qid = rand_r((unsigned int *)pthread_getspecific(s->local_seed_pointer)) %
s->nr_queues;
/* Increase the waiting counter. */
atomic_inc(&s->waiting);
......
......@@ -103,6 +103,7 @@ struct scheduler {
/* The node we are working on. */
int nodeID;
/* 'Pointer' to the seed for the random number generator */
pthread_key_t local_seed_pointer;
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment