Skip to content
Snippets Groups Projects
Commit 85b0d88c authored by Aidan Chalk's avatar Aidan Chalk
Browse files

Merge branch 'master' into fortran_with_timers to add the rand bugfix into...

Merge branch 'master' into fortran_with_timers to add the rand bugfix into this branch to be used today
parents 8c56c7ce c2a3e1b9
Branches fortran_with_timers
No related tags found
No related merge requests found
......@@ -832,7 +832,8 @@ struct task *qsched_gettask ( struct qsched *s , int qid ) {
int naq, k, tid, qids[ s->nr_queues ];
struct task *t;
unsigned int seed = qid;
TIMER_TIC
/* Check if the sched is ok. */
......@@ -858,7 +859,7 @@ struct task *qsched_gettask ( struct qsched *s , int qid ) {
if ( k != qid && s->queues[k].count > 0 )
qids[ naq++ ] = k;
while ( naq > 0 ) {
k = rand() % naq;
k = rand_r(&seed) % naq;
TIMER_TIC2
tid = queue_get( &s->queues[ qids[k] ] , s , 0 );
TIMER_TOC( s , qsched_timer_queue )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment