Mercurial > hg > Gears > Gears
changeset 876:8c89ee7dd6b3
fix putdown
author | ikkun <ikkun@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 23 Jan 2021 18:41:22 +0900 |
parents | 9f1b993f5283 |
children | e2a0e5a65a3d |
files | src/parallel_execution/examples/DPP2/PhilsImpl.cbc src/parallel_execution/generate_stub.pl |
diffstat | 2 files changed, 8 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/src/parallel_execution/examples/DPP2/PhilsImpl.cbc Sat Jan 23 18:17:35 2021 +0900 +++ b/src/parallel_execution/examples/DPP2/PhilsImpl.cbc Sat Jan 23 18:41:22 2021 +0900 @@ -32,15 +32,16 @@ return phils; } -__code putdown_lfork(struct PhilsImpl* phils, __code next(...)) { - struct AtomicT_int* left_fork = phils->Leftfork; - goto left_fork->set(-1, putdown_rfork); - -} __code putdown_rfork(struct PhilsImpl* phils, __code next(...)) { struct AtomicT_int* right_fork = phils->Rightfork; - goto right_fork->set(-1, putdown_lfork); + goto right_fork->set(0, putdown_lfork); +} + +__code putdown_lfork(struct PhilsImpl* phils, __code next(...)) { + struct AtomicT_int* left_fork = phils->Leftfork; + goto left_fork->set(0, thinking); + } __code thinking(struct PhilsImpl* phils, struct Fork* fork, __code next(...)) {
--- a/src/parallel_execution/generate_stub.pl Sat Jan 23 18:17:35 2021 +0900 +++ b/src/parallel_execution/generate_stub.pl Sat Jan 23 18:41:22 2021 +0900 @@ -1256,7 +1256,7 @@ # p $nextMethodWantArgc; # p $nextMethodInfo; # p @args; - #die "[EROR] invalid arg $_ you shoud impl $nextMethodInfo->{args}\n"; + die "[EROR] invalid arg $line you shoud impl $nextMethodInfo->{args}\n"; }