This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Per thread data.
- From: NavEcos <ecos at navosha dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Thu, 8 Aug 2002 07:43:33 -0700
- Subject: [ECOS] Per thread data.
- Reply-to: ecos at navosha dot com
I have a question I was hoping somebody could answer.
I'm going through the code and was looking at the implementation of
the per thread data.
In ecos/packages/kernel/current/include/thread.hxx on line ~430, I
see the following code:
private:
// Array of single word entries for each index.
CYG_ADDRWORD thread_data[CYGNUM_KERNEL_THREADS_DATA_MAX];
// Map of free thread_data indexes. Each bit represents an index
// and is 1 if that index is free, and 0 if it is in use.
static cyg_ucount32 thread_data_map;
Why is "thread_data_map" defined as static?
Going through the code, it seems that this will limit the TOTAL number
of per-thread data indexes to just CYGNUM_KERNEL_THREADS_DATA_MAX
instead of limiting each thread to a total number of indexes of
CYGNUM_KERNEL_THREADS_DATA_MAX.
Why is "thead_data_map" static?
-Rich
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss