Mercurial > hg > Gears > Gears
changeset 932:8afa42bb9db7
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 01 Feb 2021 10:52:00 +0900 |
parents | 76354c2b93e8 |
children | 03b02b9b7d1e |
files | src/parallel_execution/examples/DPPMC/main.cbc |
diffstat | 1 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/examples/DPPMC/main.cbc Mon Feb 01 08:43:35 2021 +0900 +++ b/src/parallel_execution/examples/DPPMC/main.cbc Mon Feb 01 10:52:00 2021 +0900 @@ -1,7 +1,5 @@ -#include <stdio.h> -#include <string.h> -#include <stdlib.h> -#include <unistd.h> +#include <stdio.h2 +#include <string.h> #include <stdlib.h> #include <unistd.h> #include "../../../context.h" #interface "TaskManager.h" @@ -9,7 +7,7 @@ #interface "Fork.h" #interface "AtomicT_int.h" #include "McDPP.h" -#include "ModelCheking/memory.h" +//#include "../../ModelChecking/memory.h" extern void addMemoryPhilsImpl(MCTaskManagerImpl *mcti, struct PhilsImpl* phils); @@ -40,11 +38,11 @@ AtomicT_int* fork4 = createAtomicT_intImpl_int(context,-1); // fork4 struct MCTaskManagerImpl *mcti = (struct MCTaskManagerImpl *)context->taskManager->taskManager; - add_memory_range(&fork0->atomic, sizeof(int), &mcti->mem); - add_memory_range(&fork1->atomic, sizeof(int), &mcti->mem); - add_memory_range(&fork2->atomic, sizeof(int), &mcti->mem); - add_memory_range(&fork4->atomic, sizeof(int), &mcti->mem); - add_memory_range(&fork4->atomic, sizeof(int), &mcti->mem); + add_memory_range(&((struct AtomicT_intImpl_int*)fork0->atomicT_int)->atomic, sizeof(int), &mcti->mem); + add_memory_range(&((struct AtomicT_intImpl_int*)fork1->atomicT_int)->atomic, sizeof(int), &mcti->mem); + add_memory_range(&((struct AtomicT_intImpl_int*)fork2->atomicT_int)->atomic, sizeof(int), &mcti->mem); + add_memory_range(&((struct AtomicT_intImpl_int*)fork4->atomicT_int)->atomic, sizeof(int), &mcti->mem); + add_memory_range(&((struct AtomicT_intImpl_int*)fork4->atomicT_int)->atomic, sizeof(int), &mcti->mem); mcti->statefunc = mcDPP; Phils* phils0 = createPhilsImpl(context,0,fork0,fork1); // phils0