* [ECOS] cyg_addrword_t data type
@ 2000-09-14 23:05 Sandeep Rikhi
2000-09-15 10:36 ` Jonathan Larmour
0 siblings, 1 reply; 2+ messages in thread
From: Sandeep Rikhi @ 2000-09-14 23:05 UTC (permalink / raw)
To: eCos Discussion Gp.
Sir,
I'm working on eCos for an ADSL Modem to be used on MPC 850 micro
processor.
Sir,The definition of
cyg_addrword_t says that it is basically a cyg_uint32 i.e 32 bit unsigned
integer. But the description says, it can be used as apointer to some
memory location or a data word. Isn't it ambiguous.
e.g. If accidently a type mismatch occurs, some serious fatal errors can
occur. Please put some light on the usage of this particular data
structure.
Regards !
*********************************************************
Sandeep Rikhi
GET-GCPE Group.
Switching Division B1,
C-DOT, B'lore
Ph: (080) 2263399 ext:205/217,2250009,2282119
*********************************************************
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] cyg_addrword_t data type
2000-09-14 23:05 [ECOS] cyg_addrword_t data type Sandeep Rikhi
@ 2000-09-15 10:36 ` Jonathan Larmour
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Larmour @ 2000-09-15 10:36 UTC (permalink / raw)
To: Sandeep Rikhi; +Cc: eCos Discussion Gp.
Sandeep Rikhi wrote:
>
> I'm working on eCos for an ADSL Modem to be used on MPC 850 micro
> processor.
> Sir,The definition of
> cyg_addrword_t says that it is basically a cyg_uint32 i.e 32 bit unsigned
> integer. But the description says, it can be used as apointer to some
> memory location or a data word. Isn't it ambiguous.
> e.g. If accidently a type mismatch occurs, some serious fatal errors can
> occur. Please put some light on the usage of this particular data
> structure.
A cyg_addrword_t is special and is only to be used in certain circumstances
- to pass around opaque data of unknown type. On some machines the size of
an integer or long variable, and the size of a memory address, may all
differ. In such cases, a cyg_addrword_t would have to be the largest of
these sizes.
An example of when it is useful is starting a thread - the entry_data
argument (which is used as an argument to the thread entry function) is
something the thread creator passes and may be anything - an integer, an
address, anything.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-15 10:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-14 23:05 [ECOS] cyg_addrword_t data type Sandeep Rikhi
2000-09-15 10:36 ` Jonathan Larmour
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).