Mercurial > hg > Game > Cerium
diff TaskManager/kernel/schedule/SchedTask.cc @ 466:c73aff02db67 draft
prohibit global variable in Task....
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 01 Oct 2009 17:33:58 +0900 |
parents | 0d64bdb63005 |
children | 839e34d0cc3c |
line wrap: on
line diff
--- a/TaskManager/kernel/schedule/SchedTask.cc Wed Sep 30 11:37:15 2009 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Thu Oct 01 17:33:58 2009 +0900 @@ -6,6 +6,7 @@ #include "DmaManager.h" #include "error.h" #include "TaskManager.h" +#include <stdarg.h> extern Scheduler::TaskObject task_list[MAX_TASK_OBJECT]; @@ -49,6 +50,9 @@ __renew_flag = 0; __cur_index = 0; __flag_renewTask = SCHED_TASK_NORMAL; + this->stdout_ = stdout; + this->stderr_ = stderr; + this->stdin_ = stdin; ex_init = &SchedTask::ex_init_normal; ex_read = &SchedTask::ex_read_normal; @@ -609,6 +613,28 @@ __scheduler->wait_segment(s); } +/* system call */ + +int +SchedTask::fprintf(FILE * stream, const char * format, ...) +{ + va_list ap; + va_start(ap,format); + int ret = vfprintf(stream,format, ap); + va_end(ap); + return ret; +} + +int +SchedTask::printf(const char * format, ...) +{ + va_list ap; + va_start(ap,format); + int ret= vfprintf(stdout,format, ap); + va_end(ap); + return ret; +} + /* end */