Beispiel #1
0
Host *
newHost(Task *owner, Symbol name, Symbol conn)
{
    Host *h = (Host *) zalloc(sizeof(Host));

    h->name = symCopy(name);
    h->conn = symCopy(conn);
    h->task = owner;
    return h;
}
Beispiel #2
0
/* pragmatics analysis */
void
pragmatics(Symbol rule, RealTime delta)
{
    Expr	*x = symValue(rule);
    Task	*t;

    if (x->op != NOP) {
	t = findTask(delta);
	bundle(t, x);
	t->nrules++;
	t->rules = (Symbol *) ralloc(t->rules, t->nrules * sizeof(Symbol));
	t->rules[t->nrules-1] = symCopy(rule);
	perf->eval_expected += (float)1/delta;
    }
}