Make include/barrelfish/ump_impl.h compile for C++.
authorSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 2 Feb 2015 14:34:09 +0000 (15:34 +0100)
committerSimon Gerber <simon.gerber@inf.ethz.ch>
Mon, 2 Feb 2015 14:34:09 +0000 (15:34 +0100)
Signed-off-by: Simon Gerber <simon.gerber@inf.ethz.ch>

include/barrelfish/ump_impl.h

index 71e9021..9555051 100644 (file)
@@ -124,7 +124,7 @@ static inline errval_t ump_chan_state_init(struct ump_chan_state *c,
     }
 
     c->pos = 0;
-    c->buf = buf;
+    c->buf = (volatile struct ump_message *) buf;
     c->dir = dir;
     c->bufmsgs = size / UMP_MSG_BYTES;
     c->epoch = 1;
@@ -149,8 +149,8 @@ static inline errval_t ump_chan_state_init(struct ump_chan_state *c,
 static inline volatile struct ump_message *ump_impl_poll(struct ump_chan_state *c)
 {
     assert(c->dir == UMP_INCOMING);
-    struct ump_control ctrl = c->buf[c->pos].header.control;
-    if (ctrl.epoch == c->epoch) {
+    ump_control_t ctrl_epoch =  c->buf[c->pos].header.control.epoch;
+    if (ctrl_epoch == c->epoch) {
         return &c->buf[c->pos];
     } else {
         return NULL;