Commit 8d104aef authored by Pedro Gonnet's avatar Pedro Gonnet
Browse files

fix task acceptance criteria.


Former-commit-id: 9d976c58a7f5984d4e081dbcd211b799e61ab6f6
parent bf2bb3a9
......@@ -343,7 +343,8 @@ struct task *queue_gettask_new ( struct queue *q , int rid , int blocking , int
score_best = score;
/* Should we bother looking any farther? */
if ( score_best == 2 )
if ( ( qtasks[ qtid[ ind_best ] ].cj == NULL && score_best == 1 ) ||
score_best == 2 );
break;
} /* loop over the task IDs. */
......
......@@ -18,6 +18,10 @@
******************************************************************************/
/* Some constants. */
#define queue_maxhits 10
/* The queue timers themselves. */
enum {
queue_timer_none = 0,
......
......@@ -1079,7 +1079,7 @@ void *runner_main ( void *data ) {
TIMER_TIC
t = NULL;
if ( r->nr_queues == 1 ) {
t = queue_gettask_new( &r->queues[0] , rt->id , 1 , 0 );
t = queue_gettask( &r->queues[0] , 1 , 0 );
}
else if ( r->policy & runner_policy_steal ) {
if ( ( myq->next == myq->count ) ||
......
......@@ -37,9 +37,6 @@ enum {
runner_timer_dopair,
runner_timer_dosub,
runner_timer_getpair,
runner_timer_queue,
runner_timer_tree,
runner_timer_bubble,
runner_timer_steal,
runner_timer_stalled,
runner_timer_count,
......
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