Mercurial > hg > Papers > 2020 > ikkun-sigos
changeset 21:5e2ebae9a4a7
add
author | ikkun <ikkun@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 07 May 2020 22:55:05 +0900 |
parents | 25448605ecdb |
children | 93e14a1e4d6a |
files | .DS_Store paper/src/pickupL.cbc |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/paper/src/pickupL.cbc Thu May 07 22:55:05 2020 +0900 @@ -0,0 +1,10 @@ +code pickup_lfork(PhilsPtr self, TaskPtr current_task) +{ + if (self->left_fork->owner == NULL) { + self->left_fork->owner = self; + self->next = pickup_rfork; + goto scheduler(self, current_task); + } else { + self->next = hungry1; + goto scheduler(self, current_task); +} \ No newline at end of file