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]

Re: Message boxes


Alfredo Carrillo wrote:
> 
> I am using message boxes for exange information between two threads, but
> need to pass a structure, not only simple data as 'int' or 'char'. When
> I compile my program, the compiler shows as follows:
> 
> cannot convert from type 'MyTYPE' to type 'void*'
> 
> How could I use types defined by me to interchange info?

Message boxes store void *'s, which means you should be passing in the
address of a structure most likely. Obviously be careful that the contents
of the structure are not made invalid, or deleted before the recipient can
process the message - only the pointer is copied into the queue, not the
structure it points to.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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