public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Syntaxis
@ 2001-04-16  7:19 Rafael Rodríguez Velilla
  2001-04-17  0:22 ` Jesper Skov
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael Rodríguez Velilla @ 2001-04-16  7:19 UTC (permalink / raw)
  To: ecos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

  I have seen in the kapi.cxx the following code.
Cyg_Interrupt *t = new ((void *)intr) Cyg_Interrupt (
   (cyg_vector) vector,
   (cyg_priority)priority,
   (CYG_ADDRWORD)data,
   (cyg_ISR *) isr,
   (cyg_DSR *)dsr );
 t=t;

  There are a pair of things that I don't quite understand:
  new ((void *)intr) ...
  Does this mean that the object will be constructed at the address
pointed by intr?

  What is t=t; used for?

  I think that the first sentence makes "t" point to the new created
object at the address "intr". Why is it necessary to tell "t" to point
to "t"?


--
Rafael Rodríguez Velilla        rrv@tid.es
Telefónica I+D          http://www.tid.es
Telf: +34 - 91 337 4270




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ECOS] Syntaxis
  2001-04-16  7:19 [ECOS] Syntaxis Rafael Rodríguez Velilla
@ 2001-04-17  0:22 ` Jesper Skov
  0 siblings, 0 replies; 2+ messages in thread
From: Jesper Skov @ 2001-04-17  0:22 UTC (permalink / raw)
  To: Rafael Rodríguez Velilla; +Cc: ecos

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 321 bytes --]

>>>>> "Rafael" == Rafael Rodríguez Velilla <rrv@tid.es> writes:

Rafael>   What is t=t; used for?

Rafael>   I think that the first sentence makes "t" point to the new
Rafael> created object at the address "intr". Why is it necessary to
Rafael> tell "t" to point to "t"?

It silences a compiler warning, IIRC.

Jesper

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-04-17  0:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-16  7:19 [ECOS] Syntaxis Rafael Rodríguez Velilla
2001-04-17  0:22 ` Jesper Skov

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).