[ECOS] Message boxes

Jonathan Larmour jlarmour@redhat.com
Mon Jun 4 16:09:00 GMT 2001


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



More information about the Ecos-discuss mailing list