[Barrelfish-users] About ump_impl.h

tomsun.0.7 tomsun.0.7 at gmail.com
Mon Feb 2 08:15:19 CET 2015


Hi,

I am the one who is porting applications to Barrelfish. Again, I come
across some problems on C++ compatibility.

At first, I tried test program for e1000 driver, and it worked well.
However, when I port an application using this driver, I found something
awful:

>

../include/barrelfish/ump_impl.h: In function ‘errval_t
> ump_chan_state_init(ump_chan_state*, volatile void*, size_t,
> ump_direction)’:

../include/barrelfish/ump_impl.h:127:12: error: *invalid conversion*
from ‘*volatile
> void**’ to ‘*volatile ump_message**’ [-fpermissive]

     c->buf = buf;

            ^

../include/barrelfish/ump_impl.h: In function ‘volatile ump_message*
> ump_impl_poll(ump_chan_state*)’:

../include/barrelfish/ump_impl.h:152:53: error: *no matching function* for
> call to ‘*ump_control::ump_control(volatile ump_control&)*’

     struct ump_control ctrl = c->buf[c->pos].header.control;

                                                     ^

In a word, C++ thinks *it is dangerous to cast a volatile type into a
non-volatile type* and I think so, too.

So, is there any elegant solution to solve this problem?
Looking forward to your kind reply, thanks a lot!

Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.inf.ethz.ch/pipermail/barrelfish-users/attachments/20150202/d408a59f/attachment.html 


More information about the Barrelfish-users mailing list