aboutsummaryrefslogtreecommitdiff
path: root/i386
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2024-02-19 23:58:00 -0500
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2024-03-11 23:48:10 +0100
commit661835c91d14a41755c5f340ba0257c6ca8db1a1 (patch)
treefe1a18724d73eede6bc5c7c72858b74a8efe4bdd /i386
parentafec41f9d80cb1f923d0d4f76af832b036dc2f4f (diff)
downloadgnumach-661835c91d14a41755c5f340ba0257c6ca8db1a1.tar.gz
gnumach-661835c91d14a41755c5f340ba0257c6ca8db1a1.tar.bz2
gnumach-661835c91d14a41755c5f340ba0257c6ca8db1a1.zip
x86_64: avoid iterating over the message twice in copyoutmsg/copyinmsg for faster RPCs.
This is a follow up to https://git.savannah.gnu.org/cgit/hurd/gnumach.git/commit/?id=69620634858b2992e1a362e33c95d9a8ee57bce7 where we made inlined ports 8 bytes long to avoid resizing. The last thing that copy{in,out}msg were doing was just updating msgt_size field since that's required for kernel stub code and implicitly assumed by IPC code. This was moved into ipc_kmsg_copy{in,out}_body. For a 32 bit userland, the code also stops updating msgt_size for out of line ports, same as the 64 bit userland. Message-ID: <ZdQxWNSieTHcpM1b@jupiter.tail36e24.ts.net>
Diffstat (limited to 'i386')
-rw-r--r--i386/i386/locore.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/i386/i386/locore.h b/i386/i386/locore.h
index 374c8cf9..217e6dec 100644
--- a/i386/i386/locore.h
+++ b/i386/i386/locore.h
@@ -50,7 +50,13 @@ extern int discover_x86_cpu_type (void);
extern int copyin (const void *userbuf, void *kernelbuf, size_t cn);
extern int copyinmsg (const void *userbuf, void *kernelbuf, size_t cn, size_t kn);
extern int copyout (const void *kernelbuf, void *userbuf, size_t cn);
+#ifdef USER32
extern int copyoutmsg (const void *kernelbuf, void *userbuf, size_t cn);
+#else
+static inline int copyoutmsg (const void *kernelbuf, void *userbuf, size_t cn) {
+ return copyout (kernelbuf, userbuf, cn);
+}
+#endif
extern int inst_fetch (int eip, int cs);