Mercurial > hg > Members > kono > Cerium
changeset 47:8266445bdac2
*** empty log message ***
author | gongo |
---|---|
date | Fri, 15 Feb 2008 13:09:58 +0900 |
parents | f154d9d07a42 |
children | 70a0ac46133e |
files | TaskManager/Fifo/FifoTaskInfo.cc TaskManager/Fifo/FifoTaskManagerImpl.cc TaskManager/Makefile.def TaskManager/kernel/ppe/BufferManager.cc |
diffstat | 4 files changed, 5 insertions(+), 65 deletions(-) [+] |
line wrap: on
line diff
--- a/TaskManager/Fifo/FifoTaskInfo.cc Fri Feb 15 13:09:43 2008 +0900 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,60 +0,0 @@ -#include <stdio.h> -#include <stdlib.h> -#include "FifoTaskInfo.h" - -int -FifoTaskInfo::extend_pool_taskList(int num) -{ - TaskListPtr q = NULL; - - q = (TaskListPtr)malloc(sizeof(TaskList)*(num+1)); - - if (q == NULL) { - return -1; - } - - q->next = taskListPool; - taskListPool = q; - - /* Connect all free pack_list in the pool */ - for (q = taskListPool + 1; --num > 0; q++) { - q->next = q + 1; - } - q->next = freeTaskList; - freeTaskList = taskListPool + 1; - - return 0; -} - -TaskListPtr -FifoTaskInfo::get_available_taskList(void) -{ - TaskListPtr list, q; - - list = machineTaskList[0]; - - while (list->next) list = list->next; - - if (list->length < TASK_MAX_SIZE) { - return list; - } else { - q = get_free_taskList(); - machineTaskList[0] = append_taskList(machineTaskList[0], q); - return q; - } -} - -void -FifoTaskInfo::clear_taskList(void) -{ - TaskListPtr p, p1; - - machineTaskList[0]->length = 0; - - p = machineTaskList[0]->next; - while (p) { - p1 = p; - p = p->next; - free_taskList(p1); - } -}
--- a/TaskManager/Fifo/FifoTaskManagerImpl.cc Fri Feb 15 13:09:43 2008 +0900 +++ b/TaskManager/Fifo/FifoTaskManagerImpl.cc Fri Feb 15 13:09:58 2008 +0900 @@ -2,7 +2,7 @@ #include <stdlib.h> #include <string.h> #include "FifoTaskManagerImpl.h" -#include "ppe_spe.h" +#include "types.h" FifoTaskManagerImpl::~FifoTaskManagerImpl(void) { @@ -15,7 +15,7 @@ { TaskManagerImpl::init(); - taskInfo = new FifoTaskInfo(); + taskInfo = new BufferManager; taskInfo->init(); }
--- a/TaskManager/Makefile.def Fri Feb 15 13:09:43 2008 +0900 +++ b/TaskManager/Makefile.def Fri Feb 15 13:09:58 2008 +0900 @@ -1,4 +1,4 @@ -#TARGET = ppe-main +TARGET = ppe-main TARGET = libmanager.a KERN_DIR = kernel @@ -24,7 +24,7 @@ IMPL_CELL_OBJS = $(IMPL_CELL_SRCS:.cpp=.o) CC = g++ -CFLAGS = -Wall -g -D_PPE_DEBUG -DDEBUG +CFLAGS = -O9 -Wall -g# -D_PPE_DEBUG -DDEBUG LIBS = INCLUDE = -I../include/TaskManager \ No newline at end of file
--- a/TaskManager/kernel/ppe/BufferManager.cc Fri Feb 15 13:09:43 2008 +0900 +++ b/TaskManager/kernel/ppe/BufferManager.cc Fri Feb 15 13:09:58 2008 +0900 @@ -1,6 +1,6 @@ #include <stdio.h> #include <stdlib.h> -#include "TaskInfo.h" +#include "BufferManager.h" BufferManager::BufferManager(int num) :machineNum(num), activeTaskQueue(NULL), waitTaskQueue(NULL) {}