Mercurial > hg > Members > nobuyasu > CbC
changeset 28:ac2555eeeb17 draft
add Scheduler
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 08 Oct 2012 20:49:23 +0900 |
parents | adce006dc64a |
children | 3873895c12a8 |
files | DPP/memory.h Scheduler/a.out Scheduler/scheduler.cbc compare/tree/Makefile |
diffstat | 4 files changed, 51 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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);
--- /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 <stdio.h> +#include <stdlib.h> + +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; +} + + + + + +
--- 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