Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 1 Feb 2002 11:50:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 1 Feb 2002 11:50:45 -0500 Received: from ns.suse.de ([213.95.15.193]:29202 "HELO Cantor.suse.de") by vger.kernel.org with SMTP id ; Fri, 1 Feb 2002 11:50:34 -0500 To: Christoph Hellwig Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH][RFC] kthread abstraction In-Reply-To: <20020201163818.A32551@caldera.de.suse.lists.linux.kernel> From: Andi Kleen Date: 01 Feb 2002 17:50:33 +0100 In-Reply-To: Christoph Hellwig's message of "1 Feb 2002 16:43:43 +0100" Message-ID: Lines: 18 X-Mailer: Gnus v5.7/Emacs 20.6 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Christoph Hellwig writes: > void *data; > > Opaque data for the thread's use. That requires to dynamically allocate and initialize kthread if you can have potentially multiple threads (= too much to write) I think it would be better to pass data as a separate argument. You can put the kthread and the data into a private structure on the stack, pass the address of it to kernel_thread and wait until the thread has read it using a completion. That would make a nicer API. -Andi - 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/