From owner-freebsd-arch@FreeBSD.ORG Thu Sep 25 19:40:39 2014 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81588D55; Thu, 25 Sep 2014 19:40:39 +0000 (UTC) Received: from mail-la0-x22b.google.com (mail-la0-x22b.google.com [IPv6:2a00:1450:4010:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45D42661; Thu, 25 Sep 2014 19:40:38 +0000 (UTC) Received: by mail-la0-f43.google.com with SMTP id gb8so3751522lab.30 for ; Thu, 25 Sep 2014 12:40:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ZOpE4UhU7SAegE5aQtQm6vvnQB0O/9qmMkvKZVAd9VU=; b=pdht5swNRefqd1eV+bNQsEx7OzSegD5t+ibaEHWumx2pWkZZNRap17D0Y1HRiGAhBv kEf22zkFaPi2U77F1AHv0+x8avaACNdIMe/UzQGzxiDn9XWI3aPkkIQRAciO42TtGu55 yb1HnNSmpMuOXlR34SNvPEdB0nSkHHYc0KbykfJZuKcVv3CBIwyNT03gk+f+ql3xzOrW 4ASWudCMjv+2AsaLKbgqK5YRgdAPgz7UBFomgPVmHBIndSCsVivL6nvAavfA+5WQp0N7 4gTP/nVhleYi2si/WVEC3ibLghjT/Y3Od+8TGSaynB0O196HtUkX/n451lpv4FL63Hp4 yttw== MIME-Version: 1.0 X-Received: by 10.112.135.137 with SMTP id ps9mr15063048lbb.24.1411674036159; Thu, 25 Sep 2014 12:40:36 -0700 (PDT) Sender: kmacybsd@gmail.com Received: by 10.25.86.18 with HTTP; Thu, 25 Sep 2014 12:40:36 -0700 (PDT) In-Reply-To: <1411669263.66615.249.camel@revolution.hippie.lan> References: <54236CD6.4050807@FreeBSD.org> <5424392D.9030201@FreeBSD.org> <1411668571.66615.247.camel@revolution.hippie.lan> <1411669263.66615.249.camel@revolution.hippie.lan> Date: Thu, 25 Sep 2014 12:40:36 -0700 X-Google-Sender-Auth: HYxDJvSX8MipFwjQG0Bha2KMw1w Message-ID: Subject: Re: KASSERT_WARN for asserting malloc(M_WAITOK) not in a non-sleepable thread From: "K. Macy" To: Ian Lepore Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: Davide Italiano , Adrian Chadd , Bryan Drewery , "freebsd-arch@freebsd.org" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 19:40:39 -0000 > > > > To me, another "clear and specific semantic" that's associated with the > word 'assert' in C programming is that the test expression itself is > automatically printed as part of the diagnostic message. That's not the > case in the FreeBSD kernel, so I guess we need to rename KASSERT as > well? > Funny you mention that. It's always been a pet peeve of mine that KASSERT doesn't print the assertion. I always reasoned it away that instead it prints a string that is supposed to convey the significance of the expression. So I think it clearly still follows the original intent. Thanks for the suggestion though. -K