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]

Question CYGNUM_KERNEL_THREADS_DATA_MAX?


I tried to change the cdl_option below and got a warning

 cdl_option CYGNUM_KERNEL_THREADS_DATA_MAX {
 display            "Number of words of per-thread data"
 flavor             data
 legal_values       4 to 65535
 default_value      65535
 description "..."
 }

In the code its used like this

// Set the data map bits for each free slot in the data array.
cyg_ucount32 Cyg_Thread::thread_data_map =
(~CYGNUM_KERNEL_THREADS_DATA_ALL) &

((1<<CYGNUM_KERNEL_THREADS_DATA_MAX)-1);


This shifts 1 << 65535, which looks strange to me... and GCC gives me a
warning.
 Is this code correct?

/Fredrik Hederstierna



-- 
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]