This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: How to retrieve the thread control block information
- From: Nick Garnett <nickg at ecoscentric dot com>
- To: Yubin Gong <ygong688 at yahoo dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: 02 Jul 2004 09:01:38 +0100
- Subject: Re: [ECOS] How to retrieve the thread control block information
- References: <20040701181534.41926.qmail@web51006.mail.yahoo.com>
Yubin Gong <ygong688@yahoo.com> writes:
> Hi, I would like to know if there is a simple way to
> retrieve the task control block information that is
> provided when a thread is created, including
> sched_info, name, stack_base, etc. as shown in the
> following prototype:
>
> void cyg_thread_create(cyg_addrword_t sched_info,
> cyg_thread_entry_t* entry, cyg_addrword_t entry_data,
> char* name, void* stack_base, cyg_ucount32 stack_size,
> cyg_handle_t* handle, cyg_thread* thread);
>
>
> I can use the function cyg_thread_self() to get the
> handle, but I don't know how to use the handle to get
> a pointer to the control block.
>
As always, a brief look at the documentation will answer your
question. Take a look at cyg_thread_get_info():
http://ecos.sourceware.org/docs-latest/ref/kernel-thread-info.html
--
Nick Garnett eCos Kernel Architect
http://www.ecoscentric.com/ The eCos and RedBoot experts
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss