Re: [PATCH][RFC] kthread abstraction

Jeff Garzik (garzik@havoc.gtf.org)
Fri, 1 Feb 2002 12:50:20 -0500


On Fri, Feb 01, 2002 at 04:38:19PM +0100, Christoph Hellwig wrote:
> void (*main)(struct kthread *);
>
> Mainloop of the thread. This loop is repeated until the thread
> is stopped. After finishing this method the common code calls
> schedule() so it's no allowed to have spinlocks held over more
> than one invocation.

Seems kinda nifty so far. The only comment is that I wouldn't call
schedule or anything like that. Give the thread the flexibility to
decide how it sleeps or loops. Duplicating schedule() calls is IMHO an
ok price to pay for this flexibility.

Jeff

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