changeset 1517:411401d1cb71 draft

remove minor warning. time is not valid unless CERIUM_FIFO is defined. why?
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sat, 10 Nov 2012 11:07:23 +0900
parents e544f9747169
children 940ffd32e5bd
files TaskManager/Fifo/PreRefDmaManager.cc TaskManager/Fifo/PreRefDmaManager.h TaskManager/Fifo/gettime.h TaskManager/Fifo/rdtsc.h TaskManager/Gpu/GpuScheduler.cc
diffstat 5 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/TaskManager/Fifo/PreRefDmaManager.cc	Thu Nov 08 17:20:10 2012 +0900
+++ b/TaskManager/Fifo/PreRefDmaManager.cc	Sat Nov 10 11:07:23 2012 +0900
@@ -3,7 +3,7 @@
 #include "TaskManagerImpl.h"
 
 void *
-PreRefDmaManager::dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask)
+PreRefDmaManager::dma_load(Scheduler *s, memaddr addr, uint32 size, uint32 mask)
 {
 	unsigned long long wait = 0;
 	(this->*start_dmawait_profile)();
--- a/TaskManager/Fifo/PreRefDmaManager.h	Thu Nov 08 17:20:10 2012 +0900
+++ b/TaskManager/Fifo/PreRefDmaManager.h	Sat Nov 10 11:07:23 2012 +0900
@@ -7,7 +7,7 @@
 
 public:
 	/* functions */
-    virtual void *dma_load(Scheduler *s, void *buf, memaddr addr, uint32 size, uint32 mask);
+    virtual void *dma_load(Scheduler *s, memaddr addr, uint32 size, uint32 mask);
     virtual void free_(void *buf);
 } ;
 
--- a/TaskManager/Fifo/gettime.h	Thu Nov 08 17:20:10 2012 +0900
+++ b/TaskManager/Fifo/gettime.h	Sat Nov 10 11:07:23 2012 +0900
@@ -10,8 +10,8 @@
  */
 inline unsigned long long gettime() {
 
-	unsigned long long time;
-#ifdef __CERIUM_FIFO__
+	unsigned long long time = 0;
+#ifdef __CERIUM_FIFO__  // ??
 	struct timespec ts;
 
 #ifndef __APPLE__
--- a/TaskManager/Fifo/rdtsc.h	Thu Nov 08 17:20:10 2012 +0900
+++ b/TaskManager/Fifo/rdtsc.h	Sat Nov 10 11:07:23 2012 +0900
@@ -6,8 +6,8 @@
  */
 
 inline unsigned long long rdtsc() {
-	unsigned long long ret;
-#ifdef __CERIUM_FIFO__
+	unsigned long long ret = 0;
+#ifdef __CERIUM_FIFO__ // ??
 	__asm__ volatile ("rdtsc" : "=A" (ret));
 #endif // __CERIUM_FIFO__
 	return ret;
--- a/TaskManager/Gpu/GpuScheduler.cc	Thu Nov 08 17:20:10 2012 +0900
+++ b/TaskManager/Gpu/GpuScheduler.cc	Sat Nov 10 11:07:23 2012 +0900
@@ -137,7 +137,8 @@
 
             reply[cur] = (memaddr)tasklist->waiter;
 
-            usleep(10000);
+            // usleep(10000);
+            clFlush(command_queue[cur]); // flush for queued task
             clFinish(command_queue[cur]); // waiting for queued task
             // pipeline    : 1-cur
             // no pipeline : cur