浏览代码

minor fixes for compiler warnings

Nathalie Furmento 14 年之前
父节点
当前提交
cad5904ca4
共有 2 个文件被更改,包括 24 次插入14 次删除
  1. 13 4
      src/core/dependencies/implicit_data_deps.c
  2. 11 10
      src/datawizard/coherency.c

+ 13 - 4
src/core/dependencies/implicit_data_deps.c

@@ -23,7 +23,7 @@
 #if 0
 # define _STARPU_DEP_DEBUG(fmt, args ...) fprintf(stderr, fmt, ##args);
 #else
-# define _STARPU_DEP_DEBUG(fmt, args ...) 0
+# define _STARPU_DEP_DEBUG(fmt, args ...)
 #endif
 
 /* This function adds the implicit task dependencies introduced by data
@@ -72,8 +72,11 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
 					struct starpu_task *task_array[1] = {handle->last_submitted_writer};
 					starpu_task_declare_deps_array(pre_sync_task, 1, task_array);
 					_STARPU_DEP_DEBUG("dep %p -> %p\n", handle->last_submitted_writer, pre_sync_task);
-				} else
+				}
+                                else
+                                {
 					_STARPU_DEP_DEBUG("No dep\n");
+                                }
 
 				/* If there is a ghost writer instead, we
 				 * should declare a ghost dependency here, and
@@ -89,8 +92,11 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
 						_starpu_bound_job_id_dep(pre_sync_job, handle->last_submitted_ghost_writer_id);
 						_STARPU_DEP_DEBUG("dep ID%lu -> %p\n", handle->last_submitted_ghost_writer_id, pre_sync_task);
 						handle->last_submitted_ghost_writer_id_is_valid = 0;
-					} else
+					}
+                                        else
+                                        {
 						_STARPU_DEP_DEBUG("No dep ID\n");
+                                        }
 				}
 	
 				handle->last_submitted_writer = post_sync_task;
@@ -174,8 +180,11 @@ void _starpu_detect_implicit_data_deps_with_handle(struct starpu_task *pre_sync_
 				struct starpu_task *task_array[1] = {handle->last_submitted_writer};
 				_STARPU_DEP_DEBUG("dep %p -> %p\n", handle->last_submitted_writer, pre_sync_task);
 				starpu_task_declare_deps_array(pre_sync_task, 1, task_array);
-			} else
+			}
+                        else
+                        {
 				_STARPU_DEP_DEBUG("No dep\n");
+                        }
 
 			/* There was perhaps no last submitted writer but a
 			 * ghost one, we should report that here, and keep the

+ 11 - 10
src/datawizard/coherency.c

@@ -338,6 +338,17 @@ void _starpu_release_data_on_node(starpu_data_handle handle, uint32_t default_wt
 	_starpu_spin_unlock(&handle->header_lock);
 }
 
+inline void _starpu_set_data_requested_flag_if_needed(starpu_data_handle handle, uint32_t node)
+{
+// XXX : this is just a hint, so we don't take the lock ...
+//	pthread_spin_lock(&handle->header_lock);
+
+	if (handle->per_node[node].state == STARPU_INVALID) 
+		handle->per_node[node].requested = 1;
+
+//	pthread_spin_unlock(&handle->header_lock);
+}
+
 int _starpu_prefetch_task_input_on_node(struct starpu_task *task, uint32_t node)
 {
 	starpu_buffer_descr *descrs = task->buffers;
@@ -488,13 +499,3 @@ unsigned _starpu_is_data_present_or_requested(starpu_data_handle handle, uint32_
 	return ret;
 }
 
-inline void _starpu_set_data_requested_flag_if_needed(starpu_data_handle handle, uint32_t node)
-{
-// XXX : this is just a hint, so we don't take the lock ...
-//	pthread_spin_lock(&handle->header_lock);
-
-	if (handle->per_node[node].state == STARPU_INVALID) 
-		handle->per_node[node].requested = 1;
-
-//	pthread_spin_unlock(&handle->header_lock);
-}