summaryrefslogtreecommitdiff
path: root/libviengoos
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@gnu.org>2008-12-18 16:54:27 +0100
committerNeal H. Walfield <neal@gnu.org>2008-12-18 16:54:27 +0100
commit60a851e8caed8f1d79e943b3eb099690e72e0c89 (patch)
treec6a31a36797c3eb6c5eb383d192f105c9d88de04 /libviengoos
parent21b900f421e258eb8c4f293de45cd88ce638456e (diff)
Use the first capability in a message to designate the reply messenger.
libviengoos/ 2008-12-18 Neal H. Walfield <neal@gnu.org> * viengoos/rpc.h (RPC_SEND_MARSHAL): Make the reply messenger the first capability. (RPC_SEND_UNMARSHAL): Likewise. viengoos/ 2008-12-18 Neal H. Walfield <neal@gnu.org> * server.c (server_loop): Use the first capability as the reply messenger.
Diffstat (limited to 'libviengoos')
-rw-r--r--libviengoos/ChangeLog6
-rw-r--r--libviengoos/viengoos/rpc.h13
2 files changed, 13 insertions, 6 deletions
diff --git a/libviengoos/ChangeLog b/libviengoos/ChangeLog
index c7670b7..b21f285 100644
--- a/libviengoos/ChangeLog
+++ b/libviengoos/ChangeLog
@@ -1,5 +1,11 @@
2008-12-18 Neal H. Walfield <neal@gnu.org>
+ * viengoos/rpc.h (RPC_SEND_MARSHAL): Make the reply messenger the
+ first capability.
+ (RPC_SEND_UNMARSHAL): Likewise.
+
+2008-12-18 Neal H. Walfield <neal@gnu.org>
+
* RPC: Move here from ../hurd.
2008-12-18 Neal H. Walfield <neal@gnu.org>
diff --git a/libviengoos/viengoos/rpc.h b/libviengoos/viengoos/rpc.h
index 7ede9ce..7817f54 100644
--- a/libviengoos/viengoos/rpc.h
+++ b/libviengoos/viengoos/rpc.h
@@ -385,10 +385,10 @@ typedef vg_addr_t cap_t;
vg_message_clear (msg); \
/* Add the label. */ \
vg_message_append_word (msg, RPC_ID_PREFIX_(id)); \
- /* Then load the arguments. */ \
- RPCLOAD (icount, ##__VA_ARGS__); \
- /* Finally, add the reply messenger. */ \
+ /* The reply messenger. */ \
vg_message_append_cap (msg, reply_messenger); \
+ /* And finally, load the arguments. */ \
+ RPCLOAD (icount, ##__VA_ARGS__); \
}
/* Unmarshal a request. */
@@ -410,8 +410,11 @@ typedef vg_addr_t cap_t;
return EINVAL; \
} \
\
+ if (reply_messenger) \
+ *reply_messenger = vg_message_cap (msg, 0); \
+ \
int __rsu_data_idx __attribute__ ((unused)) = 1; \
- int __rsu_cap_idx __attribute__ ((unused)) = 0; \
+ int __rsu_cap_idx __attribute__ ((unused)) = 1; \
error_t __rsu_err = 0; \
RPCSTORE (icount, ##__VA_ARGS__); \
if (unlikely (__rsu_err \
@@ -427,8 +430,6 @@ typedef vg_addr_t cap_t;
return EINVAL; \
} \
\
- if (reply_messenger) \
- *reply_messenger = vg_message_cap (msg, __rsu_cap_idx); \
return 0; \
}