Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Mar 2016 10:09:38 +0000 (UTC)
From:      Peter Holm <pho@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r297377 - user/pho/stress2/misc
Message-ID:  <201603291009.u2TA9cZv055778@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603291009.u2TA9cZv055778>