templates: add _get_buf() in seL4MultisharedData Adds a function to retrieve the generated dataport on the -from side of the template. Mirrors the _buf(seL4_Word client_id) function on the -to template side. The function could not be named _buf() as this lead to a symbol clash with shmem_name. Signed-off-by: Thomas Wittal <thomas.wittal@hensoldt-cyber.de>
diff --git a/templates/seL4MultiSharedData-from.template.c b/templates/seL4MultiSharedData-from.template.c index 45cf953..c08eb0c 100644 --- a/templates/seL4MultiSharedData-from.template.c +++ b/templates/seL4MultiSharedData-from.template.c
@@ -37,8 +37,11 @@ volatile void * /*? shmem_name ?*/ = (volatile void *) & /*? shmem_symbol ?*/; -size_t /*? me.interface.name ?*/_get_size(void) -{ +volatile void * /*? me.interface.name ?*/_get_buf(void) { + return /*? shmem_name ?*/; +} + +size_t /*? me.interface.name ?*/_get_size(void) { return ROUND_UP_UNSAFE(/*? shmem_size ?*/, PAGE_SIZE_4K); }
diff --git a/templates/seL4MultiSharedData-from.template.h b/templates/seL4MultiSharedData-from.template.h index 821218e..c3ef32a 100644 --- a/templates/seL4MultiSharedData-from.template.h +++ b/templates/seL4MultiSharedData-from.template.h
@@ -8,4 +8,5 @@ #include <sel4/sel4.h> /*# Declare all the function prototypes for this connector. #*/ +volatile void * /*? me.interface.name ?*/_get_buf(void); size_t /*? me.interface.name ?*/_get_size(void);