* [ECOS] How to retrieve the thread control block information
@ 2004-07-01 18:15 Yubin Gong
2004-07-02 8:01 ` Nick Garnett
0 siblings, 1 reply; 5+ messages in thread
From: Yubin Gong @ 2004-07-01 18:15 UTC (permalink / raw)
To: ecos-discuss
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.
Thanks for your help!
Yubin
__________________________________
Do you Yahoo!?
Read only the mail you want - Yahoo! Mail SpamGuard.
http://promotions.yahoo.com/new_mail
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] How to retrieve the thread control block information
2004-07-01 18:15 [ECOS] How to retrieve the thread control block information Yubin Gong
@ 2004-07-02 8:01 ` Nick Garnett
2004-07-02 16:54 ` Yubin Gong
0 siblings, 1 reply; 5+ messages in thread
From: Nick Garnett @ 2004-07-02 8:01 UTC (permalink / raw)
To: Yubin Gong; +Cc: ecos-discuss
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] How to retrieve the thread control block information
2004-07-02 8:01 ` Nick Garnett
@ 2004-07-02 16:54 ` Yubin Gong
2004-07-02 17:06 ` Nick Garnett
0 siblings, 1 reply; 5+ messages in thread
From: Yubin Gong @ 2004-07-02 16:54 UTC (permalink / raw)
To: Nick Garnett; +Cc: ecos-discuss
Thanks, Nick.
I found that these kernel APIs are only available in
eCos-2.0. Unfortunately the project I am involved is
still using 1.3.1.
--- Nick Garnett <nickg@ecoscentric.com> wrote:
> 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
>
>
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] How to retrieve the thread control block information
2004-07-02 16:54 ` Yubin Gong
@ 2004-07-02 17:06 ` Nick Garnett
2004-07-03 7:01 ` sandeep
0 siblings, 1 reply; 5+ messages in thread
From: Nick Garnett @ 2004-07-02 17:06 UTC (permalink / raw)
To: Yubin Gong; +Cc: ecos-discuss
Yubin Gong <ygong688@yahoo.com> writes:
> Thanks, Nick.
>
> I found that these kernel APIs are only available in
> eCos-2.0. Unfortunately the project I am involved is
> still using 1.3.1.
I *strongly* suggest that you move to 2.0 or, better, the current CVS
repository.
If you really cannot do that, then it should not be too hard to
back-port those routines to 1.3.1, they are reasonable independent of
everything else.
--
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ECOS] How to retrieve the thread control block information
2004-07-02 17:06 ` Nick Garnett
@ 2004-07-03 7:01 ` sandeep
0 siblings, 0 replies; 5+ messages in thread
From: sandeep @ 2004-07-03 7:01 UTC (permalink / raw)
To: Yubin Gong; +Cc: ecos-discuss
>>I found that these kernel APIs are only available in
>>eCos-2.0. Unfortunately the project I am involved is
>>still using 1.3.1.
Which chip/hardware are you using?
> I *strongly* suggest that you move to 2.0 or, better, the current CVS
> repository.
This would be more profitable step for you/your organisation. so heed this
suggestion of Nick.
--
regards
sandeep
--------------------------------------------------------------------------
"You'll never be the man your mother was!"
--------------------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-07-03 7:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-01 18:15 [ECOS] How to retrieve the thread control block information Yubin Gong
2004-07-02 8:01 ` Nick Garnett
2004-07-02 16:54 ` Yubin Gong
2004-07-02 17:06 ` Nick Garnett
2004-07-03 7:01 ` sandeep
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).