public inbox for ecos-patches@sourceware.org
 help / color / mirror / Atom feed
From: jlarmour@ecoscentric.com (Jonathan Larmour)
To: ecos-patches@ecos.sourceware.org
Subject: Fix bug 1000637
Date: Tue, 18 Nov 2008 14:05:00 -0000	[thread overview]
Message-ID: <20081118140429.06DF510C9B6@dargo.barn.ecoscentric.com> (raw)

Index: ChangeLog
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/ChangeLog,v
retrieving revision 1.147
diff -u -5 -p -r1.147 ChangeLog
--- ChangeLog	14 Nov 2008 14:26:09 -0000	1.147
+++ ChangeLog	18 Nov 2008 14:04:27 -0000
@@ -1,5 +1,11 @@
+2008-11-18  Sergei Gavrikov  <sergei.gavrikov@gmail.com>
+
+	* tests/tm_basic.cxx (max): Actually the meaning was right before,
+	it was just the name that was wrong. So revert below, and change 
+	name to min.
+
 2008-11-14  Jonathan Larmour  <jifl@eCosCentric.com>
 
 	* tests/tm_basic.cxx (max): Was wrong way round. Resolves issue
 	1000636.
 
Index: tests/tm_basic.cxx
===================================================================
RCS file: /cvs/ecos/ecos/packages/kernel/current/tests/tm_basic.cxx,v
retrieving revision 1.25
diff -u -5 -p -r1.25 tm_basic.cxx
--- tests/tm_basic.cxx	14 Nov 2008 14:26:09 -0000	1.25
+++ tests/tm_basic.cxx	18 Nov 2008 14:04:27 -0000
@@ -207,12 +207,12 @@ void run_semaphore_tests(void);
 void run_semaphore_circuit_test(void);
 void run_counter_tests(void);
 void run_flag_tests(void);
 void run_alarm_tests(void);
 
-#ifndef max
-#define max(n,m) ((m) > (n) ? (m) : (n))
+#ifndef min
+#define min(X,Y) ((X) < (Y) ? (X) : (Y))
 #endif
 
 // Wait until a clock tick [real time clock] has passed.  This should keep it
 // from happening again during a measurement, thus minimizing any fluctuations
 void
@@ -1823,24 +1823,24 @@ void tm_basic_main( void )
         nalarms = NALARMS;
     }
 
     // Sanity
 #ifdef WORKHORSE_TEST
-    ntest_threads = max(512, ntest_threads);
-    nmutexes = max(1024, nmutexes);
-    nsemaphores = max(1024, nsemaphores);
-    nmboxes = max(1024, nmboxes);
-    ncounters = max(1024, ncounters);
-    nalarms = max(1024, nalarms);
+    ntest_threads = min(512, ntest_threads);
+    nmutexes = min(1024, nmutexes);
+    nsemaphores = min(1024, nsemaphores);
+    nmboxes = min(1024, nmboxes);
+    ncounters = min(1024, ncounters);
+    nalarms = min(1024, nalarms);
 #else
-    ntest_threads = max(64, ntest_threads);
-    nmutexes = max(32, nmutexes);
-    nsemaphores = max(32, nsemaphores);
-    nmboxes = max(32, nmboxes);
-    ncounters = max(32, ncounters);
-    nflags = max(32, nflags);
-    nalarms = max(32, nalarms);
+    ntest_threads = min(64, ntest_threads);
+    nmutexes = min(32, nmutexes);
+    nsemaphores = min(32, nsemaphores);
+    nmboxes = min(32, nmboxes);
+    ncounters = min(32, ncounters);
+    nflags = min(32, nflags);
+    nalarms = min(32, nalarms);
 #endif
 
     new_thread(run_all_tests, 0);
     
     Cyg_Scheduler::scheduler.start();

                 reply	other threads:[~2008-11-18 14:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081118140429.06DF510C9B6@dargo.barn.ecoscentric.com \
    --to=jlarmour@ecoscentric.com \
    --cc=ecos-patches@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).