Browse Source

src/core/task/c: Set task->buffers to NULL

Nathalie Furmento 13 years ago
parent
commit
2f9d1ed6d5
2 changed files with 2 additions and 4 deletions
  1. 0 2
      TODO
  2. 2 2
      src/core/task.c

+ 0 - 2
TODO

@@ -8,6 +8,4 @@ TODO list
 
 - Make struct starpu_buffer_descr private (or not, as it can still be used in tests and examples)
 
-- Set task->buffers to NULL
-
 - When cost_model is provided, but not cost_function, need to rebuild a struct starpu_buffer_descr

+ 2 - 2
src/core/task.c

@@ -323,7 +323,6 @@ void _starpu_task_check_deprecated_fields(struct starpu_task *task)
 			if (task->buffers[i].handle && task->handles[i])
 			{
 				fprintf(stderr, "[warning][struct starpu_task] task->buffers[%d] and task->handles[%d] both set. Ignoring task->buffers[%d] ?\n", i, i, i);
-				//task->buffers[i].handle = NULL;
 				STARPU_ASSERT(task->buffers[i].mode == task->cl->modes[i]);
 				STARPU_ABORT();
 			}
@@ -331,8 +330,9 @@ void _starpu_task_check_deprecated_fields(struct starpu_task *task)
 			{
 				task->handles[i] = task->buffers[i].handle;
 				task->cl->modes[i] = task->buffers[i].mode;
-				//task->buffers[i].handle = NULL;
 			}
+			task->buffers[i].handle = NULL;
+			task->buffers[i].mode = 0;
 		}
 	}
 }