From owner-p4-projects@FreeBSD.ORG Wed Jul 24 15:54:45 2013 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D560CED1; Wed, 24 Jul 2013 15:54:44 +0000 (UTC) Delivered-To: perforce@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 ESMTP id 96ED5ECF for ; Wed, 24 Jul 2013 15:54:44 +0000 (UTC) (envelope-from jonathan@freebsd.org) Received: from skunkworks.freebsd.org (skunkworks.freebsd.org [8.8.178.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 694DC2A20 for ; Wed, 24 Jul 2013 15:54:44 +0000 (UTC) Received: from skunkworks.freebsd.org ([127.0.1.74]) by skunkworks.freebsd.org (8.14.7/8.14.7) with ESMTP id r6OFsiZC078487 for ; Wed, 24 Jul 2013 15:54:44 GMT (envelope-from jonathan@freebsd.org) Received: (from perforce@localhost) by skunkworks.freebsd.org (8.14.7/8.14.6/Submit) id r6OFsinD078484 for perforce@freebsd.org; Wed, 24 Jul 2013 15:54:44 GMT (envelope-from jonathan@freebsd.org) Date: Wed, 24 Jul 2013 15:54:44 GMT Message-Id: <201307241554.r6OFsinD078484@skunkworks.freebsd.org> X-Authentication-Warning: skunkworks.freebsd.org: perforce set sender to jonathan@freebsd.org using -f From: Jonathan Anderson Subject: PERFORCE change 231418 for review To: Perforce Change Reviews Precedence: bulk X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.14 List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Jul 2013 15:54:45 -0000 http://p4web.freebsd.org/@@231418?ac=10 Change 231418 by jonathan@jonathan-on-joe on 2013/07/24 15:54:41 Sync commit cf3aca from GitHub: allow programmer-specified assertion names. I wouldn't use this feature very much yet (requires testing), but here are the header changes that will allow it to work. Affected files ... .. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/include/tesla-macros.h#10 edit .. //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/include/tesla.h#9 edit Differences ... ==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/include/tesla-macros.h#10 (text+ko) ==== @@ -54,7 +54,7 @@ /** An inline assertion. */ #define TESLA_ASSERT(locality, start, end, expression) \ __tesla_inline_assertion( \ - __FILE__, __LINE__, __COUNTER__, \ + "", __FILE__, __LINE__, __COUNTER__, \ locality, start, end, expression \ ) ==== //depot/projects/ctsrd/tesla/src/sys/contrib/tesla/include/tesla.h#9 (text+ko) ==== @@ -57,13 +57,15 @@ * Magic "function" representing a TESLA assertion. * * Its arguments are: + * * an explicit programmer-supplied name (optional: can be set to "") * * name of the file the assertion is located in (__FILE__) * * the line the assertion is defined at (__LINE__) * * a counter to ensure uniqueness (__COUNTER__) * * the TESLA context (per-thread or global) */ void -__tesla_inline_assertion(const char *filename, int line, int count, +__tesla_inline_assertion(const char *name, + const char *filename, int line, int count, __tesla_locality *loc, ...); #define __TESLA_INFINITE_REPETITIONS INT_MAX @@ -165,8 +167,8 @@ struct __tesla_automaton_description* __tesla_automaton_done(); inline struct __tesla_automaton_usage* -__tesla_struct_uses_automaton(const char *automaton, - __tesla_locality *loc, ...) +__tesla_struct_uses_automaton(__unused const char *automaton, + __unused __tesla_locality *loc, ...) { return 0; } @@ -183,7 +185,7 @@ */ #define __tesla_struct_usage(subject, automaton, loc, start, end) \ struct __tesla_automaton_usage* \ - __tesla_struct_automaton_usage_##struct_name##_##automaton(subject) { \ + __tesla_struct_automaton_usage_##struct_name##_##automaton(__unused subject) { \ return __tesla_struct_uses_automaton( \ #automaton, loc, start, end); \ }