Mercurial > hg > Gears > Gears
changeset 915:675eb6b5b69d
...
author | anatofuz <anatofuz@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 28 Jan 2021 11:15:48 +0900 |
parents | c6effc4245e4 |
children | c8d83e38d87c |
files | src/parallel_execution/ModelChecking/MCWorker.cbc src/parallel_execution/examples/DPPMC/PhilsImpl.cbc |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/ModelChecking/MCWorker.cbc Thu Jan 28 10:16:52 2021 +0900 +++ b/src/parallel_execution/ModelChecking/MCWorker.cbc Thu Jan 28 11:15:48 2021 +0900 @@ -63,8 +63,8 @@ for (int i = 0; i <= length; i++) { struct Element* tmpElem = getElementByIdx(mcQueue, i); struct Context* tmpContext = (struct Context*)tmpElem->data; - MCTaskManagerImpl *mcti = (struct MCTaskManagerImpl *)worker->taskManager->taskManager; - add_memory_range(&tmpContext->next, sizeof(enum Code), &mcti->mem); + MCTaskManagerImpl *mcti = (struct MCTaskManagerImpl *)worker->taskManager->taskManager; + add_memory_range(&tmpContext->next, sizeof(enum Code), &mcti->mem); } goto meta(ncontext, ncontext->next); }
--- a/src/parallel_execution/examples/DPPMC/PhilsImpl.cbc Thu Jan 28 10:16:52 2021 +0900 +++ b/src/parallel_execution/examples/DPPMC/PhilsImpl.cbc Thu Jan 28 11:15:48 2021 +0900 @@ -43,11 +43,13 @@ __code putdown_rfork(struct PhilsImpl* phils, __code next(...)) { struct AtomicT_int* right_fork = phils->Rightfork; + //printf("%d: putdown_rfork\n", phils->self); goto right_fork->set(-1, putdown_lfork); } __code putdown_lfork(struct PhilsImpl* phils, __code next(...)) { struct AtomicT_int* left_fork = phils->Leftfork; + //printf("%d: putdown_lfork\n", phils->self); goto left_fork->set(-1, thinking); } @@ -59,11 +61,13 @@ __code pickup_rfork(struct PhilsImpl* phils, __code next(...)) { struct AtomicT_int* right_fork = phils->Rightfork; + ////printf("%d: phickup_rfork\n", phils->self); goto right_fork->checkAndSet(-1, phils->self, pickup_lfork, pickup_rfork); } __code pickup_lfork(struct PhilsImpl* phils, __code next(...)) { struct AtomicT_int* left_fork = phils->Leftfork; + //printf("%d: phickup_lfork\n", phils->self); goto left_fork->checkAndSet(-1, phils->self, pickup_rfork, eating); }