view paper/src/pickupL.cbc @ 20:97f508fb5bf2

*** empty log message ***
author atsuki
date Wed, 20 Feb 2008 05:53:14 +0900
parents a67653fda270
children f9826b88bd8f
line wrap: on
line source

code pickup_lfork(PhilsPtr self, TaskPtr current_task)
{
    if (self->left_fork->owner == NULL) {
	printf("%d: pickup_lfork:%d\n", self->id, self->left_fork->id);
	self->left_fork->owner = self;
	self->next = pickup_rfork;
	goto scheduler(self, current_task);
    } else {
	self->next = hungry1;
	goto scheduler(self, current_task);
}