From owner-svn-src-user@freebsd.org Tue Mar 29 10:09:40 2016 Return-Path: Delivered-To: svn-src-user@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0A069AE1714 for ; Tue, 29 Mar 2016 10:09:40 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2155151E; Tue, 29 Mar 2016 10:09:39 +0000 (UTC) (envelope-from pho@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u2TA9cRX055779; Tue, 29 Mar 2016 10:09:38 GMT (envelope-from pho@FreeBSD.org) Received: (from pho@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u2TA9cZv055778; Tue, 29 Mar 2016 10:09:38 GMT (envelope-from pho@FreeBSD.org) Message-Id: <201603291009.u2TA9cZv055778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pho set sender to pho@FreeBSD.org using -f From: Peter Holm Date: Tue, 29 Mar 2016 10:09:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r297377 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Mar 2016 10:09:40 -0000 Author: pho Date: Tue Mar 29 10:09:38 2016 New Revision: 297377 URL: https://svnweb.freebsd.org/changeset/base/297377 Log: Change the name of a define to a more logical one. Modified: user/pho/stress2/misc/advlock.sh Modified: user/pho/stress2/misc/advlock.sh ============================================================================== --- user/pho/stress2/misc/advlock.sh Tue Mar 29 10:05:52 2016 (r297376) +++ user/pho/stress2/misc/advlock.sh Tue Mar 29 10:09:38 2016 (r297377) @@ -99,7 +99,7 @@ volatile u_int *share; char *cmdline[] = { "./true", NULL }; const char *tp; -#define EXAMPLE 0 +#define SYNC 0 #define PARALLEL 2 #define RUNTIME (1 * 60) @@ -117,8 +117,8 @@ slock(void) int fd; setproctitle("%s", __func__); - atomic_add_int(&share[EXAMPLE], 1); - while (share[EXAMPLE] != PARALLEL) + atomic_add_int(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) ; tp = __func__; @@ -137,8 +137,8 @@ elock(void) int fd; setproctitle("%s", __func__); - atomic_add_int(&share[EXAMPLE], 1); - while (share[EXAMPLE] != PARALLEL) + atomic_add_int(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) ; tp = __func__; @@ -160,8 +160,8 @@ stest(void) int fd; setproctitle("%s", __func__); - atomic_add_int(&share[EXAMPLE], 1); - while (share[EXAMPLE] != PARALLEL) + atomic_add_int(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) ; tp = __func__; @@ -181,8 +181,8 @@ etest(void) int fd; setproctitle("%s", __func__); - atomic_add_int(&share[EXAMPLE], 1); - while (share[EXAMPLE] != PARALLEL) + atomic_add_int(&share[SYNC], 1); + while (share[SYNC] != PARALLEL) ; tp = __func__; @@ -213,7 +213,7 @@ main(void) start = time(NULL); while ((time(NULL) - start) < RUNTIME) { n++; - share[EXAMPLE] = 0; + share[SYNC] = 0; if (fork() == 0) slock(); if (fork() == 0) @@ -226,7 +226,7 @@ main(void) if (r != 0) break; - share[EXAMPLE] = 0; + share[SYNC] = 0; if (fork() == 0) elock(); if (fork() == 0)