# HG changeset patch # User Nobuyasu Oshiro # Date 1349696963 -32400 # Node ID ac2555eeeb178a94458e11fd243374aa7b0822a3 # Parent adce006dc64abb6d04665072ab35be5ad14bce20 add Scheduler diff -r adce006dc64a -r ac2555eeeb17 DPP/memory.h --- a/DPP/memory.h Tue Aug 14 17:45:55 2012 +0900 +++ b/DPP/memory.h Mon Oct 08 20:49:23 2012 +0900 @@ -43,6 +43,7 @@ memory_lookup(MemoryPtr m, MemoryPtr *parent, MemoryPtr (*new_memory)(MemoryPtr), MemoryPtr *out); + extern MemoryPtr add_memory_range(void *ptr,int length, MemoryPtr *parent); diff -r adce006dc64a -r ac2555eeeb17 Scheduler/a.out Binary file Scheduler/a.out has changed diff -r adce006dc64a -r ac2555eeeb17 Scheduler/scheduler.cbc --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Scheduler/scheduler.cbc Mon Oct 08 20:49:23 2012 +0900 @@ -0,0 +1,46 @@ +#include +#include + +void init_task_manager() { + printf("function init\n"); +} + + + + + +typedef struct task_manager task_manager; +struct task_manager { + int machineNum; + void (*init)(); +}; + +task_manager* create_manager() { + task_manager* manager = malloc(sizeof(task_manager)); + manager->machineNum = 1; + manager->init = init_task_manager; + return manager; +} + +void free_manager(task_manager *manager) { + free(manager); +} + +int main(int argc, char* argv[]) { + + task_manager *manager = create_manager(); + manager->init(manager); + + + + + + free_manager(manager); + return 0; +} + + + + + + diff -r adce006dc64a -r ac2555eeeb17 compare/tree/Makefile --- a/compare/tree/Makefile Tue Aug 14 17:45:55 2012 +0900 +++ b/compare/tree/Makefile Mon Oct 08 20:49:23 2012 +0900 @@ -2,7 +2,7 @@ CC = cbc-gcc-4.6.0 #CFLAGS = -O3 CFLAGS = -O0 -g -PROG = tree unbalance_binary_tree +PROG = tree unbalance_binary_tree unbalance_binary_tree2 all: $(PROG) @@ -12,5 +12,8 @@ unbalance_binary_tree: unbalance_binary_tree.cbc $(CC) $(CFLAGS) -o $@ $^ +unbalance_binary_tree2: unbalance_binary_tree2.cbc + $(CC) $(CFLAGS) -o $@ $^ + clean: rm -rf $(PROG) *.dSYM