This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Where's per-thread data implementation?
- From: Andrew Lunn <andrew at lunn dot ch>
- To: "Paul D. DeRocco" <pderocco at ix dot netcom dot com>
- Cc: eCos Discuss <ecos-discuss at ecos dot sourceware dot org>
- Date: Sat, 26 Nov 2005 16:41:59 +0100
- Subject: Re: [ECOS] Where's per-thread data implementation?
- References: <NEBBKHCFDGIGIJEHDJFCIEIEBJAB.pderocco@ix.netcom.com>
On Mon, Nov 14, 2005 at 10:58:24PM -0800, Paul D. DeRocco wrote:
> I've found a declaration for thread_data in thread.hxx, and the code to
> clear it out in thread.cxx, along with the code to allocate slots in it. But
> where is the code that actually accesses this array? I'm looking for the
> source for Cyg_Thread::get_data, etc., but a global text search didn't turn
> it up. Where is it?
packages/kernel/current/include/thread.inl:486:
inline CYG_ADDRWORD Cyg_Thread::get_data( Cyg_Thread::cyg_data_index index )
{
CYG_ASSERT( index < CYGNUM_KERNEL_THREADS_DATA_MAX,
"Per thread data index out of bounds");
CYG_ASSERT( (thread_data_map & (1<<index)) == 0,
"Unallocated index used");
return self()->thread_data[index];
}
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss