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 #22 from Sergei Gavrikov <sergei.gavrikov@gmail.com> 2011-07-05 17:09:37 BST ---
(In reply to comment #20)

> To me both are obvious. I think it is not necessary explaining max to eCos
> programmer :)
> 
> > #ifndef max
> > #define max(X,Y) ((X) > (Y) ? (X) : (Y))
> > #endif

No, this is not explanation :-) This is a *reminder* that such a check and
definition should be *above* its usage. FYI: there is the same definition
for min() in the test.

> > #define N_THREADS_MAX  ((CYGMEM_REGION_ram_SIZE/16)/CYG_THREAD_OVERHEAD)
> > #define NTEST_THREADS  max(2, N_THREADS_MAX)
> 
> I would change N_THREADS_MAX to somethine other as upper expression
> suggests it needn't be the Max. Maybe N_THREADS_EST (estimated) or
> N_THREADS_MAX_EST.

Then I did correct myself (comment 18) and offer N_THREADS_AVAIL for
naming.

> > 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?
> 
> NTEST_2_THR was intended to mean constant 2. If you don't like it we
> can keep the original (bare 2).

As for me "bare 2" is preferred there.

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


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