Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262293AbVERPsu (ORCPT ); Wed, 18 May 2005 11:48:50 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262234AbVERPq2 (ORCPT ); Wed, 18 May 2005 11:46:28 -0400 Received: from ms-smtp-01.nyroc.rr.com ([24.24.2.55]:2753 "EHLO ms-smtp-01.nyroc.rr.com") by vger.kernel.org with ESMTP id S262281AbVERPpK (ORCPT ); Wed, 18 May 2005 11:45:10 -0400 Subject: Re: Share Wait Queue between different modules ? From: Steven Rostedt To: Dinesh Ahuja Cc: linux-kernel In-Reply-To: <20050518150200.88195.qmail@web8506.mail.in.yahoo.com> References: <20050518150200.88195.qmail@web8506.mail.in.yahoo.com> Content-Type: text/plain Organization: Kihon Technologies Date: Wed, 18 May 2005 11:45:03 -0400 Message-Id: <1116431103.5014.7.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.2 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 31 On Wed, 2005-05-18 at 16:02 +0100, Dinesh Ahuja wrote: > Thanks Steven for answer. > > Could please tell me know how to share wait queue > between different modules and where will be pratical > implementation of that case. A wait_queue is where a task goes while waiting for some event. If you want to share it among modules you first need to determine where the wait queue would be declared. If module A and module B use the same wait queue, and module A has declared it. Then module B would be dependent on module A. Module A would also have to export the wait queue via the EXPORT_SYMBOL macro. Or, the wait queue can be declared in the kernel itself and all modules can use it. As for a practical implementation for doing this, I'm not sure what you are asking for since the question itself is quite abstract. I haven't needed to export a wait queue from one module to the next. The best I can tell you is if one module supplies some functionality or driver for some device that has a wait queue for some event, and another module adds functionality or a sub system of the device that needs to have tasks wait on the same event, then I guess that would be one case. -- Steve - 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/