浏览代码

use shorter function names

Olivier Aumage 8 年之前
父节点
当前提交
2daa522db8

+ 1 - 1
src/core/jobs.c

@@ -758,7 +758,7 @@ int _starpu_push_local_task(struct _starpu_worker *worker, struct starpu_task *t
 
 	starpu_wake_worker_locked(worker->workerid);
 	starpu_push_task_end(task);
-	_starpu_worker_unlock_for_observation(worker->workerid);
+	_starpu_worker_unlock(worker->workerid);
 
 	return 0;
 }

+ 3 - 3
src/core/sched_ctx.c

@@ -2310,7 +2310,7 @@ void starpu_sched_ctx_list_task_counters_decrement_all_ctx_locked(struct starpu_
 			{
 				_starpu_worker_lock(workerid);
 				starpu_sched_ctx_list_task_counters_decrement(sched_ctx_id, workerid);
-				_starpu_worker_unlock_for_observation(workerid);
+				_starpu_worker_unlock(workerid);
 			}
 		}
 	}
@@ -2332,7 +2332,7 @@ void starpu_sched_ctx_list_task_counters_decrement_all(struct starpu_task *task,
 			{
 				_starpu_worker_lock(workerid);
 				starpu_sched_ctx_list_task_counters_decrement(sched_ctx_id, workerid);
-				_starpu_worker_unlock_for_observation(workerid);
+				_starpu_worker_unlock(workerid);
 			}
 		}
 		_starpu_sched_ctx_unlock_write(sched_ctx_id);
@@ -2355,7 +2355,7 @@ void starpu_sched_ctx_list_task_counters_reset_all(struct starpu_task *task, uns
 			{
 				_starpu_worker_lock(workerid);
 				starpu_sched_ctx_list_task_counters_reset(sched_ctx_id, workerid);
-				_starpu_worker_unlock_for_observation(workerid);
+				_starpu_worker_unlock(workerid);
 			}
 		}
 		_starpu_sched_ctx_unlock_write(sched_ctx_id);

+ 1 - 1
src/core/workers.c

@@ -1728,7 +1728,7 @@ unsigned starpu_worker_is_slave_somewhere(int workerid)
 {
 	_starpu_worker_lock(workerid);
 	unsigned ret = _starpu_config.workers[workerid].is_slave_somewhere;
-	_starpu_worker_unlock_for_observation(workerid);
+	_starpu_worker_unlock(workerid);
 	return ret;
 }
 

+ 1 - 1
src/core/workers.h

@@ -881,7 +881,7 @@ static inline int _starpu_worker_trylock(int workerid)
 	return ret;
 }
 
-static inline void _starpu_worker_unlock_for_observation(int workerid)
+static inline void _starpu_worker_unlock(int workerid)
 {
 	struct _starpu_worker *worker = _starpu_get_worker_struct(workerid);
 	STARPU_ASSERT(worker != NULL);

+ 3 - 3
src/sched_policies/component_worker.c

@@ -450,7 +450,7 @@ static void simple_worker_can_pull(struct starpu_sched_component * worker_compon
 		_starpu_sched_component_worker_set_changed_status(worker_component);
 	if(workerid != _starpu_worker_get_id() && _starpu_sched_component_worker_is_sleeping_status(worker_component))
 		starpu_wake_worker_locked(workerid);
-	_starpu_worker_unlock_for_observation(workerid);
+	_starpu_worker_unlock(workerid);
 }
 
 static int simple_worker_push_task(struct starpu_sched_component * component, struct starpu_task *task)
@@ -665,7 +665,7 @@ static void combined_worker_can_pull(struct starpu_sched_component * component)
 		}
 		if(_starpu_sched_component_worker_is_reset_status(component))
 			_starpu_sched_component_worker_set_changed_status(component);
-		_starpu_worker_unlock_for_observation(workerid);
+		_starpu_worker_unlock(workerid);
 	}
 }
 
@@ -821,7 +821,7 @@ void _starpu_sched_component_unlock_all_workers(void)
 {
 	unsigned i;
 	for(i = 0; i < starpu_worker_get_count(); i++)
-		_starpu_worker_unlock_for_observation(i);
+		_starpu_worker_unlock(i);
 }
 
 void _starpu_sched_component_workers_destroy(void)

+ 5 - 5
src/sched_policies/deque_modeling_policy_data_aware.c

@@ -405,7 +405,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 	}
 	fifo->exp_end = fifo->exp_start + fifo->exp_len;
 
-	_starpu_worker_unlock_for_observation(best_workerid);
+	_starpu_worker_unlock(best_workerid);
 
 	task->predicted = predicted;
 	task->predicted_transfer = predicted_transfer;
@@ -448,7 +448,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 		starpu_wake_worker_locked(best_workerid);
 #endif
 		starpu_push_task_end(task);
-		_starpu_worker_unlock_for_observation(best_workerid);
+		_starpu_worker_unlock(best_workerid);
 	}
 	else
 	{
@@ -460,7 +460,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 		starpu_wake_worker_locked(best_workerid);
 #endif
 		starpu_push_task_end(task);
-		_starpu_worker_unlock_for_observation(best_workerid);
+		_starpu_worker_unlock(best_workerid);
 	}
 
 	starpu_sched_ctx_list_task_counters_increment(sched_ctx_id, best_workerid);
@@ -688,7 +688,7 @@ static void compute_all_performance_predictions(struct starpu_task *task,
 				{
 					_starpu_worker_lock(workerid);
 					prev_exp_len = _starpu_fifo_get_exp_len_prev_task_list(fifo, task, workerid, nimpl, &fifo_ntasks);
-					_starpu_worker_unlock_for_observation(workerid);
+					_starpu_worker_unlock(workerid);
 				}
 			}
 
@@ -1193,7 +1193,7 @@ static void dmda_push_task_notify(struct starpu_task *task, int workerid, int pe
 
 	fifo->ntasks++;
 
-	_starpu_worker_unlock_for_observation(workerid);
+	_starpu_worker_unlock(workerid);
 }
 
 static void dmda_post_exec_hook(struct starpu_task * task, unsigned sched_ctx_id)

+ 1 - 1
src/sched_policies/eager_central_priority_policy.c

@@ -267,7 +267,7 @@ static struct starpu_task *_starpu_priority_pop_task(unsigned sched_ctx_id)
 #else
 				_starpu_worker_lock_for_observation(worker);
 				starpu_wake_worker_locked(worker);
-				_starpu_worker_unlock_for_observation(worker);
+				_starpu_worker_unlock(worker);
 #endif
 			}
 		}

+ 2 - 2
src/sched_policies/heteroprio.c

@@ -593,10 +593,10 @@ static struct starpu_task *pop_task_heteroprio_policy(unsigned sched_ctx_id)
 						/* we steal a task update global counter */
 						hp->nb_prefetched_tasks_per_arch_index[hp->workers_heteroprio[victim].arch_index] -= 1;
 
-						_starpu_worker_unlock_for_observation(victim);
+						_starpu_worker_unlock(victim);
 						goto done;
 					}
-					_starpu_worker_unlock_for_observation(victim);
+					_starpu_worker_unlock(victim);
 				}
 			}
 		}

+ 3 - 3
src/sched_policies/parallel_heft.c

@@ -125,7 +125,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 		worker_exp_start[best_workerid] = exp_end_predicted - worker_exp_len[best_workerid];
 
 		ntasks[best_workerid]++;
-		_starpu_worker_unlock_for_observation(best_workerid);
+		_starpu_worker_unlock(best_workerid);
 
 		/* We don't want it to interlace its task with a combined
 		 * worker's one */
@@ -168,7 +168,7 @@ static int push_task_on_best_worker(struct starpu_task *task, int best_workerid,
 			worker_exp_start[local_combined_workerid] = exp_end_predicted - worker_exp_len[local_combined_workerid];
 
 			ntasks[local_combined_workerid]++;
-			_starpu_worker_unlock_for_observation(local_combined_workerid);
+			_starpu_worker_unlock(local_combined_workerid);
 
 			ret |= starpu_push_local_task(local_combined_workerid, alias, prio);
 		}
@@ -317,7 +317,7 @@ static int _parallel_heft_push_task(struct starpu_task *task, unsigned prio, uns
 			worker_exp_end[workerid] = worker_exp_start[workerid] + worker_exp_len[workerid];
 			if (worker_exp_end[workerid] > max_exp_end)
 				max_exp_end = worker_exp_end[workerid];
-			_starpu_worker_unlock_for_observation(workerid);
+			_starpu_worker_unlock(workerid);
 		}
 	}
 

+ 2 - 2
src/sched_policies/work_stealing_policy.c

@@ -582,7 +582,7 @@ static struct starpu_task *ws_pop_task(unsigned sched_ctx_id)
 		record_worker_locality(ws, task, workerid, sched_ctx_id);
 		locality_popped_task(ws, task, victim, sched_ctx_id);
 	}
-	_starpu_worker_unlock_for_observation(victim);
+	_starpu_worker_unlock(victim);
 
 #ifndef STARPU_NON_BLOCKING_DRIVERS
         /* While stealing, perhaps somebody actually give us a task, don't miss
@@ -644,7 +644,7 @@ int ws_push_task(struct starpu_task *task)
 	locality_pushed_task(ws, task, workerid, sched_ctx_id);
 
 	starpu_push_task_end(task);
-	_starpu_worker_unlock_for_observation(workerid);
+	_starpu_worker_unlock(workerid);
 	starpu_sched_ctx_list_task_counters_increment(sched_ctx_id, workerid);
 
 #if !defined(STARPU_NON_BLOCKING_DRIVERS) || defined(STARPU_SIMGRID)