Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756928AbZCEQmM (ORCPT ); Thu, 5 Mar 2009 11:42:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756204AbZCEQjd (ORCPT ); Thu, 5 Mar 2009 11:39:33 -0500 Received: from e39.co.us.ibm.com ([32.97.110.160]:47132 "EHLO e39.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755466AbZCEQjc (ORCPT ); Thu, 5 Mar 2009 11:39:32 -0500 Subject: [RFC][PATCH 10/11] add checkpoint/restart compile helper To: Ingo Molnar Cc: containers , "linux-kernel@vger.kernel.org" , "Serge E. Hallyn" , Oren Laadan , Alexey Dobriyan , Christoph Hellwig , Dave Hansen From: Dave Hansen Date: Thu, 05 Mar 2009 08:39:12 -0800 References: <20090305163857.0C18F3FD@kernel> In-Reply-To: <20090305163857.0C18F3FD@kernel> Message-Id: <20090305163912.3A8363E9@kernel> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1329 Lines: 45 This is to aid the compiler a little bit so that we don't have to add as many #ifdefs. Gets used in the next patch. Signed-off-by: Dave Hansen --- linux-2.6.git-dave/include/linux/checkpoint.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff -puN include/linux/checkpoint.h~cr-compile-helper include/linux/checkpoint.h --- linux-2.6.git/include/linux/checkpoint.h~cr-compile-helper 2009-03-05 08:37:04.000000000 -0800 +++ linux-2.6.git-dave/include/linux/checkpoint.h 2009-03-05 08:37:04.000000000 -0800 @@ -115,6 +115,10 @@ static inline void __files_deny_checkpoi int cr_explain_file(struct file *file, char *explain, int left); int cr_file_supported(struct file *file); +static inline int cr_enabled(void) +{ + return 1; +} #else /* !CONFIG_CHECKPOINT_RESTART */ @@ -128,6 +132,13 @@ static inline int cr_file_supported(stru { return 0; } +/* + * Use this when you can in lieu of an #ifdef + */ +static inline int cr_enabled(void) +{ + return 0; +} #endif /* CONFIG_CHECKPOINT_RESTART */ #endif /* _CHECKPOINT_CKPT_H_ */ _ -- 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/