Re: [patch 02/11] syslets: add syslet.h include file, user API/ABI definitions

From: Indan Zupancic
Date: Tue Feb 13 2007 - 16:01:23 EST


On Tue, February 13, 2007 15:20, Ingo Molnar wrote:
> +/*
> + * Execution control: conditions upon the return code
> + * of the previous syslet atom. 'Stop' means syslet
> + * execution is stopped and the atom is put into the
> + * completion ring:
> + */
> +#define SYSLET_STOP_ON_NONZERO 0x00000008
> +#define SYSLET_STOP_ON_ZERO 0x00000010
> +#define SYSLET_STOP_ON_NEGATIVE 0x00000020
> +#define SYSLET_STOP_ON_NON_POSITIVE 0x00000040

This is confusing. Why the return code of the previous syslet atom?
Wouldn't it be more clear if the flag was for the current tasklet?
Worse, what is the previous atom? Imagine some case with a loop:

A
|
B<--.
| |
C---'

What will be the previous atom of B here? It can be either A or C,
but their return values can be different and incompatible, so what
flag should B set?

> +/*
> + * Special modifier to 'stop' handling: instead of stopping the
> + * execution of the syslet, the linearly next syslet is executed.
> + * (Normal execution flows along atom->next, and execution stops
> + * if atom->next is NULL or a stop condition becomes true.)
> + *
> + * This is what allows true branches of execution within syslets.
> + */
> +#define SYSLET_SKIP_TO_NEXT_ON_STOP 0x00000080
> +

Might rename this to SYSLET_SKIP_NEXT_ON_STOP too then.

Greetings,

Indan



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/