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]

Per thread data.


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


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