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

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

static int
p(PhilsPtr phils)
{
    PhilsPtr current = phils;
    PhilsPtr last = phils->left;

    if (last->left_fork->owner == NULL) return 0;
    while (current != last) {
	if (current->left_fork->owner == NULL) return 0;
	current = current->right;
    }
    return 1;
}

code
check(int *always_flag, PhilsPtr phils, TaskPtr list)
{
    if (p(list->phils)) {
	*always_flag = 0;
    }
    goto tableau(list);
}