This is the mail archive of the ecos-bugs@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]

[Bug 1001253] Kernel tests on small memory targets


Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001253

--- Comment #17 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-07-05 11:01:02 BST ---
Ok, back to `tm_basic`

(In reply to comment #11)

> 1. tm_basic - is good as it is since 2 tasks as a minimum is a must
> [for(i = 0;  i < 2;  i++) loops]. Number 2 is only enforced if the
> macro NTEST_THREADS (now __NTEST_THREADS) calculates < 2. If memory is
> too small than linker shall raise an error and that means that this
> test can not be performed on that configuration.

Then it seems for me this will be more clear

#ifndef max
#define max(X,Y) ((X) > (Y) ? (X) : (Y))
#endif

#define N_THREADS_MAX  ((CYGMEM_REGION_ram_SIZE/16)/CYG_THREAD_OVERHEAD)
#define NTEST_THREADS  max(2, N_THREADS_MAX)

and it's all. I dislike to add that `NTEST_2_THR` (may be N_THREADS_MIN)
and I've seen no sense to tweak those for loops. What do you think?

-- 
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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