Mercurial > hg > Members > kono > Cerium
comparison TaskManager/kernel/ppe/TaskQueueInfo.cc @ 93:dd33ec2e51b9
*** empty log message ***
author | gongo |
---|---|
date | Thu, 28 Feb 2008 17:32:18 +0900 |
parents | f154d9d07a42 |
children | 588ab5f0e659 |
comparison
equal
deleted
inserted
replaced
92:663bc2a213f5 | 93:dd33ec2e51b9 |
---|---|
19 int | 19 int |
20 TaskQueueInfo::extend_pool(int num) | 20 TaskQueueInfo::extend_pool(int num) |
21 { | 21 { |
22 TaskQueuePtr q = NULL; | 22 TaskQueuePtr q = NULL; |
23 | 23 |
24 static int i = 0; | |
25 printf("extend %d\n", ++i); | |
26 | |
24 q = (TaskQueuePtr)malloc(sizeof(TaskQueue)*(num+1)); | 27 q = (TaskQueuePtr)malloc(sizeof(TaskQueue)*(num+1)); |
25 | 28 |
26 if (q == NULL) { | 29 if (q == NULL) { |
27 return -1; | 30 return -1; |
28 } | 31 } |
41 | 44 |
42 TaskQueuePtr | 45 TaskQueuePtr |
43 TaskQueueInfo::create(HTaskPtr task) | 46 TaskQueueInfo::create(HTaskPtr task) |
44 { | 47 { |
45 TaskQueuePtr q; | 48 TaskQueuePtr q; |
49 | |
50 static int i = 0; | |
51 | |
52 printf("create %d\n", ++i); | |
46 | 53 |
47 if (freeTaskQueue == NULL) { | 54 if (freeTaskQueue == NULL) { |
48 extend_pool(100); | 55 extend_pool(100); |
49 } | 56 } |
50 q = freeTaskQueue; | 57 q = freeTaskQueue; |
58 | 65 |
59 | 66 |
60 void | 67 void |
61 TaskQueueInfo::free(TaskQueuePtr q) | 68 TaskQueueInfo::free(TaskQueuePtr q) |
62 { | 69 { |
70 static int i = 0; | |
71 | |
72 printf("free %d\n", ++i); | |
73 printf("## command %d ##\n", q->task->command); | |
74 | |
63 q->next = freeTaskQueue; | 75 q->next = freeTaskQueue; |
64 freeTaskQueue = q; | 76 freeTaskQueue = q; |
65 } | 77 } |
66 | 78 |
67 | 79 |