Mercurial > hg > GearsTemplate
changeset 82:69d0637e52fd
merge
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 11 Dec 2015 15:07:10 +0900 |
parents | dc6f665bb753 (current diff) ed9d6438d2a5 (diff) |
children | c13575c3dbe9 |
files | |
diffstat | 4 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/synchronizedQueue/CMakeLists.txt Fri Dec 11 15:06:20 2015 +0900 +++ b/src/synchronizedQueue/CMakeLists.txt Fri Dec 11 15:07:10 2015 +0900 @@ -3,6 +3,7 @@ add_executable(synchronizedQueueForCas synchronizedQueueForCas.c synchronizedQueueContext.c + origin_cs.c ) #add_executable(synchronizedQueue
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/synchronizedQueue/origin_cs.c Fri Dec 11 15:07:10 2015 +0900 @@ -0,0 +1,17 @@ +#include <stdlib.h> +#include "synchronizedQueueContext.h" + +__code meta(struct Context* context, enum Code next) { + goto (context->code[next])(context); +} + +__code start_code(struct Context* context, enum Code next) { + goto meta(context, next); +} + +__code exit_code(struct Context* context) { + free(context->code); + free(context->data); + free(context->heapStart); + goto exit(0); +}
--- a/src/synchronizedQueue/synchronizedQueue.c Fri Dec 11 15:06:20 2015 +0900 +++ b/src/synchronizedQueue/synchronizedQueue.c Fri Dec 11 15:07:10 2015 +0900 @@ -16,10 +16,6 @@ extern __code initSynchronizedQueueContext(struct Context* context); extern void allocator(struct Context* context); -__code meta(struct Context* context, enum Code next) { - goto (context->code[next])(context); -} - //__code code1(struct Context* context) { // context->data[Allocate]->allocate.size = sizeof(struct Element); // goto code2(context);
--- a/src/synchronizedQueue/synchronizedQueueForCas.c Fri Dec 11 15:06:20 2015 +0900 +++ b/src/synchronizedQueue/synchronizedQueueForCas.c Fri Dec 11 15:07:10 2015 +0900 @@ -17,10 +17,6 @@ extern void allocator(struct Context* context); -__code meta(struct Context* context, enum Code next) { - goto (context->code[next])(context); -} - //__code code1(struct Context* context) { // context->data[Allocate]->allocate.size = sizeof(struct Element); // goto code2(context);