Procházet zdrojové kódy

Remove duplicate definition of _starpu_fifo_push_sorted_task().

Cyril Roelandt před 12 roky
rodič
revize
2d2bdcd373

+ 0 - 68
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -206,74 +206,6 @@ static struct starpu_task *dmda_pop_every_task(unsigned sched_ctx_id)
 	return new_list;
 }
 
-static
-int _starpu_fifo_push_sorted_task(struct _starpu_fifo_taskq *fifo_queue, pthread_mutex_t *sched_mutex, pthread_cond_t *sched_cond, struct starpu_task *task)
-{
-	struct starpu_task_list *list = &fifo_queue->taskq;
-
-	_STARPU_PTHREAD_MUTEX_LOCK(sched_mutex);
-
-	_STARPU_TRACE_JOB_PUSH(task, 0);
-
-	if (list->head == NULL)
-	{
-		list->head = task;
-		list->tail = task;
-		task->prev = NULL;
-		task->next = NULL;
-	}
-	else
-	{
-		struct starpu_task *current = list->head;
-		struct starpu_task *prev = NULL;
-
-		while (current)
-		{
-			if (current->priority >= task->priority)
-				break;
-
-			prev = current;
-			current = current->next;
-		}
-
-		if (prev == NULL)
-		{
-			/* Insert at the front of the list */
-			list->head->prev = task;
-			task->prev = NULL;
-			task->next = list->head;
-			list->head = task;
-		}
-		else
-		{
-			if (current)
-			{
-				/* Insert between prev and current */
-				task->prev = prev;
-				prev->next = task;
-				task->next = current;
-				current->prev = task;
-			}
-			else
-			{
-				/* Insert at the tail of the list */
-				list->tail->next = task;
-				task->next = NULL;
-				task->prev = list->tail;
-				list->tail = task;
-			}
-		}
-	}
-
-	fifo_queue->ntasks++;
-	fifo_queue->nprocessed++;
-
-	_STARPU_PTHREAD_COND_SIGNAL(sched_cond);
-	_STARPU_PTHREAD_MUTEX_UNLOCK(sched_mutex);
-
-	return 0;
-}
-
 
 
 static int push_task_on_best_worker(struct starpu_task *task, int best_workerid, double predicted, int prio, unsigned sched_ctx_id)