Mercurial > hg > Members > innparusu > Gears
changeset 103:6402a33250a6
remove stack from getQueue
author | ikkun |
---|---|
date | Wed, 02 Mar 2016 21:19:01 +0900 |
parents | 64c98838a291 |
children | 828ab677c8ef 12d8e3c8976d |
files | src/parallel_execution/context.h src/parallel_execution/rb_tree.c src/parallel_execution/worker.c |
diffstat | 3 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/context.h Wed Mar 02 20:51:33 2016 +0900 +++ b/src/parallel_execution/context.h Wed Mar 02 21:19:01 2016 +0900 @@ -147,6 +147,7 @@ struct Node* root; } tree; struct Traverse { + enum Code next; struct Node* current; int result; } traverse;
--- a/src/parallel_execution/rb_tree.c Wed Mar 02 20:51:33 2016 +0900 +++ b/src/parallel_execution/rb_tree.c Wed Mar 02 21:19:01 2016 +0900 @@ -310,8 +310,7 @@ goto meta(context, Search); } - stack_pop(context->code_stack, &context->next); - goto meta(context, context->next); + goto meta(context, traverse->next); } __code get_stub(struct Context* context) {
--- a/src/parallel_execution/worker.c Wed Mar 02 20:51:33 2016 +0900 +++ b/src/parallel_execution/worker.c Wed Mar 02 21:19:01 2016 +0900 @@ -17,7 +17,9 @@ context->next = first->task->code; node->key = first->task->key; - + + struct Traverse *t = &context->data[Traverse]->traverse; + t->next = GetQueue; goto meta(context, Get); } else { goto meta(context, GetQueue);