Re: [PATCH][RFC] kthread abstraction

From: Jeff Garzik (garzik@havoc.gtf.org)
Date: Fri Feb 01 2002 - 12:50:20 EST


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/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:16 EST