# HG changeset patch # User gongo # Date 1203048598 -32400 # Node ID 8266445bdac264be542ed14f1c7efc075de7fa4f # Parent f154d9d07a4209fe6e23e6857514a9f391655473 *** empty log message *** diff -r f154d9d07a42 -r 8266445bdac2 TaskManager/Fifo/FifoTaskInfo.cc --- 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 -#include -#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); - } -} diff -r f154d9d07a42 -r 8266445bdac2 TaskManager/Fifo/FifoTaskManagerImpl.cc --- 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 #include #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(); } diff -r f154d9d07a42 -r 8266445bdac2 TaskManager/Makefile.def --- 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 diff -r f154d9d07a42 -r 8266445bdac2 TaskManager/kernel/ppe/BufferManager.cc --- 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 #include -#include "TaskInfo.h" +#include "BufferManager.h" BufferManager::BufferManager(int num) :machineNum(num), activeTaskQueue(NULL), waitTaskQueue(NULL) {}