浏览代码

tests/sched_policies/execute_all_tasks.c: fix a call to usleep().

* Give an argument that is less than 1e6 (this could fail on some Unices).
* Check the return value of usleep().
Cyril Roelandt 12 年之前
父节点
当前提交
e2663f4bea
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tests/sched_policies/execute_all_tasks.c

+ 2 - 2
tests/sched_policies/execute_all_tasks.c

@@ -25,7 +25,7 @@
  */
 
 #define NTASKS           8
-#define TASK_DURATION    1e6 /* In microseconds */
+#define TASK_DURATION    999000 /* In microseconds */
 
 extern struct starpu_sched_policy _starpu_sched_ws_policy;
 extern struct starpu_sched_policy _starpu_sched_prio_policy;
@@ -60,7 +60,7 @@ dummy(void *buffers[], void *args)
 	(void) buffers;
 	(void) args;
 
-	usleep(TASK_DURATION);
+	STARPU_ASSERT(usleep(TASK_DURATION) == 0);
 }
 
 static int