This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is tm_basic broken?


And the last silent question,  What's about n = max(1, n) there?

Sergei Gavrikov writes:
> Stupid me! Forget this. All is correct with the macro and calculator.
> Some initial values are just too big for my small memory system. It
> cannot handle 64 threads (9 threads only), so, with
> 
> ntest_threads = max(64,9)
> 
> tm_basic makes targets runs too many threads.
> 
> Execuse me, Testing, testing, testing...
> 
> Regards,
> 
> Sergei
> 
> Sergei Gavrikov wrote:
> > Hello,
> > 
> > tm_basic test does not work anymore with proper tidy max macro:
> > http://ecos.sourceware.org/ml/ecos-patches/2008-11/msg00041.html
> > 
> > old macro was :-)
> > 
> > #ifndef max
> > #define max(n,m) ((m) > (n) ? (n) : (m))
> > #endif
> > 
> > and a "calculator" is
> > 
> > #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);
> > #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);
> > #endif
> > 
> > IMHO, all works in a decade because, the calculator should be
> > 
> > #ifdef WORKHORSE_TEST
> >     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 = 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
> > 
> > 
> > May be I am wrong, but, with tidy max macro tm_basic does not work on my
> > small memory footprint target.
> > 
> > Sergei
> > 
> > -- 
> > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
> 
> -- 
> Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
> and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]