Mercurial > hg > Game > Cerium
changeset 1909:c228dbede5df draft
rename Task name in fileread
author | Masataka Kohagura <e085726@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 19 Jan 2014 21:39:52 +0900 |
parents | bd5152f8fe3a |
children | b7b528e9ec5e |
files | example/fileread/Func.h example/fileread/main.cc example/fileread/task_init.cc |
diffstat | 3 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/example/fileread/Func.h Fri Jan 17 10:21:08 2014 +0900 +++ b/example/fileread/Func.h Sun Jan 19 21:39:52 2014 +0900 @@ -2,7 +2,7 @@ #include "SysTasks.h" Read_task, Print_task, - RUN_BLOCKS, + RUN_READ_BLOCKS, MMAP, };
--- a/example/fileread/main.cc Fri Jan 17 10:21:08 2014 +0900 +++ b/example/fileread/main.cc Sun Jan 19 21:39:52 2014 +0900 @@ -29,10 +29,10 @@ off_t size; } st_mmap_t; -SchedDefineTask1(RUN_BLOCKS,run16); +SchedDefineTask1(RUN_READ_BLOCKS,read_run); static int -run16(SchedTask *manager, void *in, void *out) { +read_run(SchedTask *manager, void *in, void *out) { FileReadPtr fr = (FileReadPtr)in; char* read_text = (char*)out; @@ -64,7 +64,7 @@ if (fr->left_size > 0) { - HTaskPtr next = manager->create_task(RUN_BLOCKS, (memaddr)&fr->self, sizeof(memaddr),read_text,fr->filesize); + HTaskPtr next = manager->create_task(RUN_READ_BLOCKS, (memaddr)&fr->self, sizeof(memaddr),read_text,fr->filesize); fr->t_print->wait_for(next); next->wait_for(wait); @@ -176,7 +176,7 @@ if (divide_read_flag != 0) { char *read_text = (char*)manager->allocate(fr->filesize); - run = manager->create_task(RUN_BLOCKS, (memaddr)&fr->self, sizeof(memaddr),read_text,fr->filesize); + run = manager->create_task(RUN_READ_BLOCKS, (memaddr)&fr->self, sizeof(memaddr),read_text,fr->filesize); fr->read_text = read_text; }else { //my_mmap(filename, fd, fr);
--- a/example/fileread/task_init.cc Fri Jan 17 10:21:08 2014 +0900 +++ b/example/fileread/task_init.cc Sun Jan 19 21:39:52 2014 +0900 @@ -4,7 +4,7 @@ /* 必ずこの位置に書いて */ SchedExternTask(Read_task); SchedExternTask(Print_task); -SchedExternTask(RUN_BLOCKS); +SchedExternTask(RUN_READ_BLOCKS); SchedExternTask(MMAP); /** @@ -18,6 +18,6 @@ { SchedRegister(Read_task); SchedRegister(Print_task); - SchedRegister(RUN_BLOCKS); + SchedRegister(RUN_READ_BLOCKS); SchedRegister(MMAP); }