This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Message boxes
- To: Alfredo Carrillo <jalfredoc at netscape dot net>
- Subject: Re: [ECOS] Message boxes
- From: Jonathan Larmour <jlarmour at redhat dot com>
- Date: Tue, 05 Jun 2001 00:11:12 +0100
- CC: ecos-discuss at sources dot redhat dot com
- References: <70062BC2.2E06CABB.030B6216@netscape.net>
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