lkml.org 
[lkml]   [2002]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] kthread abstraction
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/

\
 
 \ /
  Last update: 2005-03-22 13:23    [W:0.041 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site