[ECOS] Syntaxis
Rafael RodrÃÂguez Velilla
rrv@tid.es
Mon Apr 16 07:19:00 GMT 2001
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
More information about the Ecos-discuss
mailing list