This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Syntaxis
- To: ecos <ecos-discuss at sourceware dot cygnus dot com>
- Subject: [ECOS] Syntaxis
- From: Rafael Rodríguez Velilla <rrv at tid dot es>
- Date: Mon, 16 Apr 2001 15:02:44 +0200
- Organization: Telefónica I+D
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