[ECOS] Is tm_basic broken?

Sergei Gavrikov sg@belvok.com
Tue Nov 18 10:46:00 GMT 2008


tm_basic test does not work anymore with proper tidy max macro:

old macro was :-)

#ifndef max
#define max(n,m) ((m) > (n) ? (n) : (m))

and a "calculator" is

    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 = 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);

IMHO, all works in a decade because, the calculator should be

    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);
    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);

May be I am wrong, but, with tidy max macro tm_basic does not work on my
small memory footprint target.


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

More information about the Ecos-discuss mailing list