diff TaskManager/kernel/ppe/CpuThreads.cc @ 1522:027d99ecb50e draft

run example/many_task
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Tue, 13 Nov 2012 16:16:29 +0900
parents 8d6fee66ff65
children 32305a19a380
line wrap: on
line diff
--- a/TaskManager/kernel/ppe/CpuThreads.cc	Mon Nov 12 12:43:12 2012 +0900
+++ b/TaskManager/kernel/ppe/CpuThreads.cc	Tue Nov 13 16:16:29 2012 +0900
@@ -10,7 +10,7 @@
 #include "SchedNop.h"
 #include "SpeTaskManagerImpl.h"
 #include "CellScheduler.h"
-
+#include <fcntl.h>
 
 SchedExternTask(ShowTime);
 SchedExternTask(StartProfile);
@@ -40,7 +40,7 @@
     }
 
     for (int i = 0; i < cpu_num; i++) {
-    	delete args[i].scheduler;
+        delete args[i].scheduler;
     }
 
     delete [] threads;
@@ -65,7 +65,7 @@
     SchedRegister(ShowTime);
     SchedRegister(StartProfile);
 
-    argt->wait->sem_v();	//準備完了したスレッドができるたびに+1していく
+    argt->wait->sem_v();        //準備完了したスレッドができるたびに+1していく
 
     c_scheduler->run(new SchedNop());
     c_scheduler->finish();
@@ -91,12 +91,12 @@
     }
 
     for (int i = 0; i < cpu_num; i++) {
-	pthread_create(&threads[i], NULL,
-		      &cpu_thread_run, (void*)&args[i]);
+        pthread_create(&threads[i], NULL,
+                      &cpu_thread_run, (void*)&args[i]);
     }
 
     for (int i = 0; i < cpu_num; i++) {
-    	wait->sem_p();
+        wait->sem_p();
     }
 }
 
@@ -110,7 +110,7 @@
  */
 int
 CpuThreads::get_mail(int cpuid, int count, memaddr *ret)
-{  
+{
 #ifdef __CERIUM_GPU__
     if (is_gpu(cpuid)) return gpu->get_mail(cpuid, count, ret);
 #endif
@@ -129,7 +129,7 @@
     } else {
         return 0; //mailがないとき0を返す
     }
-    
+
 }
 /**
  * Inbound Mailbox