浏览代码

modes.cocci : bugfix.

task->buffers[42] = some_expresson

was not matched.
Cyril Roelandt 13 年之前
父节点
当前提交
2c7877f1bc
共有 2 个文件被更改,包括 3 次插入4 次删除
  1. 2 3
      tools/dev/experimental/modes.cocci
  2. 1 1
      tools/dev/experimental/modes_test.c

+ 2 - 3
tools/dev/experimental/modes.cocci

@@ -20,13 +20,13 @@ t->cl = &c;
 @remove_task_mode depends on find_task@
 identifier find_task.t;
 expression E;
-identifier h;
+expression H;
 expression id; 
 identifier find_cl.c;
 @@
 (
-- t->buffers[id].handle = h;
-++ t->handles[id] = h;
+- t->buffers[id].handle = H;
 |
 - t->buffers[id].mode = E;
 )

+ 1 - 1
tools/dev/experimental/modes_test.c

@@ -21,6 +21,6 @@ foo(void)
         task->buffers[0].handle = handle1;
         task->buffers[0].mode = STARPU_R;
         task->synchronous = 1;
-        task->buffers[1].handle = handle2;
+        task->buffers[1].handle = handles[1];
         task->buffers[1].mode = STARPU_W;
 }