Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968146AbWLEQ70 (ORCPT ); Tue, 5 Dec 2006 11:59:26 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S968455AbWLEQ70 (ORCPT ); Tue, 5 Dec 2006 11:59:26 -0500 Received: from mx0.karneval.cz ([81.27.192.123]:2718 "EHLO av1.karneval.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968146AbWLEQ7Z (ORCPT ); Tue, 5 Dec 2006 11:59:25 -0500 Message-ID: <4575A53E.8030403@stud.feec.vutbr.cz> Date: Tue, 05 Dec 2006 17:58:38 +0100 From: Michal Schmidt User-Agent: IceDove 1.5.0.8 (X11/20061129) MIME-Version: 1.0 To: Jaswinder Singh CC: linux-kernel@vger.kernel.org Subject: Re: PREEMPT is messing with everyone References: <45758B57.6040107@stud.feec.vutbr.cz> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 696 Lines: 28 Jaswinder Singh skrev: > Yes, Compiler will remove it but this looks ugly and confusing. > > Why dont we use like this :- > > #ifdef CONFIG_PREEMPT > #include > #endif > > #ifdef CONFIG_PREEMPT > preempt_disable(); > #endif > > #ifdef CONFIG_PREEMPT > preempt_enable(); > #endif Surely you're joking. It is much more readable and maintainable to hide the #ifdef-hackery in header files than to clutter the *.c files. Michal - 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/