[ECOS] Error modifiying Cyg_Thread class...
Cristiano Ligieri Pereira
cpereira@ics.uci.edu
Sat Jul 7 09:28:00 GMT 2001
Hi all,
I was trying to add an extra field to the class Cyg_Thread (file
thread.cxx) and was getting a strange behavior. The field is a cyg_uint16
and I was adding it to the end of the class definition, right after the
get_unique_id() method. In addition to the variable itself, I was also
adding two accessing functions, one to set and another to get the value of
this variable (something very simple :-)).
After recompiling the code and testing I've noticed that the value I was
setting wasn't being held and when issuing the "get" I was getting a
different value. After struggling for a few hours I changed the variable
definition to the beginning of the class, right after the definition of
the variable unique_id, and everything started working fine.
Can someone explain me why is that?
Sounds like some alignment problem, but it is not clear to me why exactly
it wasn't working...
Thanks,
Cristiano.
------------------------------------------------------------
Cristiano Ligieri Pereira - http://www.ics.uci.edu/~cpereira
More information about the Ecos-discuss
mailing list