This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Syntaxis


  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





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]