Hi Ben,

If for performance reasons you want to set multiple registers at the same time, 
use the `withMRs` (e.g seL4_CallWithMRs) and other variants  of the system 
calls. These place arguments directly into registers and avoid manipulating the 
IPC buffer at all (however you're limited to 4 message registers, and 1 on 
ia32).

Otherwise `seL4_GetMR` and friends are inline convenience  functions  and only 
manipulate the IPC buffer - the compiler should optimise these for you. They 
are not system calls and will not invoke the kernel.


Cheers,
Anna.
________________________________
From: Devel <[email protected]> on behalf of Ben Ph 
<[email protected]>
Sent: Tuesday, 31 March 2020 9:12 PM
To: [email protected] <[email protected]>
Subject: [seL4] Get/Set multiple message registers with the one syscall?

I'm looking at `seL4_GetMR()` and `seL4_SetMR()`, which requires a syscall
for each get/set. To my naive eye, it seems like you're much better off
running `seL4_GetIPCBuffer()->msg` then reading/writing to each index as
needed, turning multiple syscalls (one for each get/set) into just the one.

Am I missing anything? I was planning on replacing my Get/Set calls with
direct array writes, but I'm wondering if I've missed reasons why I
shouldn't.

Thanks,
Ben
_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel
________________________________

WARNING
This email originates from an e-mail address outside of Ghost Locomotion.
Do not open attachments or click links unless you are sure this email comes 
from a known, trusted sender.

________________________________

Confidentiality Note:This email is intended only for the person or entity to 
which it is addressed and may contain information that is privileged, 
confidential or otherwise protected from disclosure. Unauthorized use, 
dissemination, distribution or copying of this email or the information herein 
by anyone other than the intended recipient is strictly prohibited. If you have 
received this email in error, please notify the sender immediately and destroy 
the original message, any attachments thereto and all copies.
_______________________________________________
Devel mailing list
[email protected]
https://sel4.systems/lists/listinfo/devel

Reply via email to