Mercurial > hg > Game > Cerium
comparison TaskManager/kernel/main.cc @ 1413:5b024efa2429 draft
fix free on non copy DMA
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sun, 19 Feb 2012 10:07:27 +0900 |
parents | b194cb2d44bb |
children | af2adce9752e |
comparison
equal
deleted
inserted
replaced
1412:f40558ec00a8 | 1413:5b024efa2429 |
---|---|
33 int | 33 int |
34 main(int argc, char *argv[]) | 34 main(int argc, char *argv[]) |
35 { | 35 { |
36 int machineNum = 0; | 36 int machineNum = 0; |
37 int speIdle = 0; | 37 int speIdle = 0; |
38 int poll_pattern = 0; | 38 int useRefDma = 0; |
39 int useRefDma = 0; | |
40 | 39 |
41 for (int i = 1; argv[i]; ++i) { | 40 for (int i = 1; argv[i]; ++i) { |
42 if (strcmp(argv[i], "-cpu") == 0) { | 41 if (strcmp(argv[i], "-cpu") == 0) { |
43 machineNum = atoi(argv[++i]); | 42 machineNum = atoi(argv[++i]); |
44 } else if (strcmp(argv[i], "-p") == 0) { | 43 } else if (strcmp(argv[i], "-p") == 0) { |
45 profile = 1; | 44 profile = 1; |
46 } else if (strcmp(argv[i], "-speidle") == 0) { | 45 } else if (strcmp(argv[i], "-speidle") == 0) { // これなんだよ? |
47 speIdle = atoi(argv[++i]); | 46 speIdle = atoi(argv[++i]); |
48 } else if (strcmp(argv[i], "-poll") == 0) { | 47 } else if (strcmp(argv[i], "-copy") == 0) { // force copy DMA in FifoManager |
49 poll_pattern = 1; | 48 useRefDma |= 0x01; |
50 } else if (strcmp(argv[i], "-ref") == 0) { | 49 } else if (strcmp(argv[i], "-pre") == 0) { // deplicated |
51 useRefDma |= 0x01; | 50 useRefDma |= 0x10; |
52 } else if (strcmp(argv[i], "-pre") == 0) { | 51 } |
53 useRefDma |= 0x10; | 52 } |
54 } | |
55 } | |
56 | 53 |
57 TaskManager *manager = new TaskManager(machineNum); | 54 TaskManager *manager = new TaskManager(machineNum); |
58 manager->init(speIdle,useRefDma); | 55 manager->init(speIdle,useRefDma); |
59 | 56 |
60 manager->set_TMend(defaultTMend); | 57 manager->set_TMend(defaultTMend); |