This is the mail archive of the ecos-discuss@sources.redhat.com 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: Question CYGNUM_KERNEL_THREADS_DATA_MAX?


Andrew Lunn wrote:
On Tue, Jan 28, 2003 at 04:22:10AM +0000, Jonathan Larmour wrote:

Andrew Lunn wrote:

It seems to me the cdl legal_value is wrong.
There is a bitmap kept for which kernel thread data entries are in
use. So for example, if thread entry 10 is in use, bit 10 of
thread_data_map will be reset. Now thread_data_map is of type
cyg_count32. ie its 32 bits. So the upper legal value should be 31,
not 65535. 32 may work, but that depends on what value 1<<32 gives.
One too big for a 32-bit word certainly! I've corrected this in CVS.

Thats what im relying on. 1<<32 should be 0 on most processors. If so,
it all works out correct. But its not something i would trust unless
it was written down in some standard and gcc actually implements that
standard.
Standards never make assumptions about things like sizeof(int), so while it may be true for GCC, it's definitely not to be relied on.

Jifl
--
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine


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


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