comparison src/parallel_execution/context.h @ 131:a4507906938c

Fix compile error but not work
author Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp>
date Tue, 25 Oct 2016 00:49:28 +0900
parents 2bb5e4f0fd35
children 7c309e1aea73
comparison
equal deleted inserted replaced
130:2bb5e4f0fd35 131:a4507906938c
69 PutQueue1, 69 PutQueue1,
70 PutQueue2, 70 PutQueue2,
71 PutQueue3, 71 PutQueue3,
72 PutQueue4, 72 PutQueue4,
73 GetQueue, 73 GetQueue,
74 PushSingleLinkedStack,
75 PopSingleLinkedStack,
74 SpawnTask, 76 SpawnTask,
75 Twice, 77 Twice,
76 StartTime, 78 StartTime,
77 EndTime, 79 EndTime,
78 Exit, 80 Exit,
85 }; 87 };
86 88
87 enum DataType { 89 enum DataType {
88 Worker, 90 Worker,
89 Allocate, 91 Allocate,
92 SingleLinkedStack,
93 Stack,
90 Tree, 94 Tree,
91 Traverse, 95 Traverse,
92 Node, 96 Node,
93 LoopCounter, 97 LoopCounter,
94 Time, 98 Time,
95 Element, 99 Element,
96 ActiveQueue, 100 ActiveQueue,
97 WaitQueue, 101 WaitQueue,
98 Queue, 102 Queue
99 }; 103 };
100 104
101 struct Context { 105 struct Context {
102 enum Code next; 106 enum Code next;
103 int codeNum; 107 int codeNum;
105 void* heapStart; 109 void* heapStart;
106 void* heap; 110 void* heap;
107 long heapLimit; 111 long heapLimit;
108 pthread_t thread; 112 pthread_t thread;
109 int thread_num; 113 int thread_num;
110 stack_ptr code_stack;
111 stack_ptr node_stack;
112 int dataNum; 114 int dataNum;
113 union Data **data; 115 union Data **data;
114 }; 116 };
115 117
116 struct QueueInterface { 118 struct QueueInterface {
166 union Data* data; 168 union Data* data;
167 enum Code push; 169 enum Code push;
168 enum Code pop; 170 enum Code pop;
169 enum Code isEmpty; 171 enum Code isEmpty;
170 enum Code next; 172 enum Code next;
171 }; 173 } stack;
172 union StackSelf { 174 union StackSelf {
173 struct SingleLinkedStack { 175 struct SingleLinkedStack {
174 struct Stack i; 176 struct Stack i;
175 struct Element* top; 177 struct Element* top;
176 } singleLinekedStack; 178 } singleLinekedStack;
177 struct ArrayStack { 179 struct ArrayStack {
178 int size; 180 int size;
179 int limit; 181 int limit;
180 struct Element* array; 182 struct Element* array;
181 } 183 } arrayStack;
182 }; 184 };
183 struct Element { 185 struct Element {
184 union Data* data; 186 union Data* data;
185 struct Element* next; 187 struct Element* next;
186 } element; 188 } element;