From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762182AbXJZBaA (ORCPT ); Thu, 25 Oct 2007 21:30:00 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752314AbXJZB3x (ORCPT ); Thu, 25 Oct 2007 21:29:53 -0400 Received: from mailout.stusta.mhn.de ([141.84.69.5]:55429 "EHLO mailhub.stusta.mhn.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751581AbXJZB3x (ORCPT ); Thu, 25 Oct 2007 21:29:53 -0400 Date: Fri, 26 Oct 2007 03:30:20 +0200 From: Adrian Bunk To: Paul Jackson Cc: Paul Menage , linux-kernel@vger.kernel.org Subject: Re: [2.6 patch] kernel/cgroup.c: remove dead code Message-ID: <20071026013019.GB30533@stusta.de> References: <20071024162534.GZ30533@stusta.de> <6599ad830710240930r6649dec0q21b8c00f7d8a796a@mail.gmail.com> <20071024103411.dfd3ae04.pj@sgi.com> <6599ad830710251810r6bb1e390nf3612031af8b6767@mail.gmail.com> <20071025182425.1336064f.pj@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20071025182425.1336064f.pj@sgi.com> User-Agent: Mutt/1.5.16 (2007-06-11) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 25, 2007 at 06:24:25PM -0700, Paul Jackson wrote: > Paul M wrote: > > Sounds reasonable to me. Is there any kind of compile-time assert > > macro in the kernel? > > Check out the assembly code generated by: > > BUG_ON(sizeof(cgrp->root->release_agent_path) < PATH_MAX)); > > (Hint: you can't find it ;) > > It -is- compile time! But when the condition is fulfilled, you get a runtime error, not a compile error. cu Adrian -- "Is there not promise of rain?" Ling Tan asked suddenly out of the darkness. There had been need of rain for many days. "Only a promise," Lao Er said. Pearl S. Buck - Dragon Seed