Mercurial > hg > Game > Cerium
diff example/HelloWorld/main.cc @ 786:043c98537bc5 draft
fix early free of TaskArray, add SchedTaskArrayNop stage.
author | yutaka@localhost.localdomain |
---|---|
date | Sat, 24 Apr 2010 15:24:33 +0900 |
parents | 94d82f2c842f |
children | 0e6c59377ef4 |
line wrap: on
line diff
--- a/example/HelloWorld/main.cc Tue Apr 20 15:54:06 2010 +0900 +++ b/example/HelloWorld/main.cc Sat Apr 24 15:24:33 2010 +0900 @@ -30,14 +30,15 @@ void hello_init(TaskManager *manager) { - HTask *hello; + for (int i = 0; i < count; i++) { /** * Create Task * create_task(Task ID); */ - hello = manager->create_task(HELLO_TASK); + + HTask *hello = manager->create_task(HELLO_TASK); /** * Select CPU @@ -50,7 +51,7 @@ * Set 32bits parameter * add_param(32bit parameter); */ - hello->add_param((memaddr)i); + hello->set_param(0,(memaddr)i); hello->spawn(); }