From 10ae2e6ebc7e9776b9f124c9fc530c79f5e84460 Mon Sep 17 00:00:00 2001 From: Kimplul Date: Fri, 2 Dec 2022 21:12:11 +0200 Subject: initial shared memory working --- include/apos/vmem.h | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'include/apos/vmem.h') diff --git a/include/apos/vmem.h b/include/apos/vmem.h index 1e481fa..38bad16 100644 --- a/include/apos/vmem.h +++ b/include/apos/vmem.h @@ -46,14 +46,18 @@ vm_t alloc_fixed_uvmem(struct tcb *r, vm_t start, size_t size, vmflags_t flags); /** * Allocate shared user virtual memory. * - * Only callable by servers, who are the owners of the shared region. - * - * @param r Process to allocate memory in. + * @param s First process to allocate memory in. + * @param c Second process to allocate memory in. * @param size Minimum size of allocation. - * @param flags Flags of allocation. - * @return Start of allocation when succesful, \c NULL otherwise. + * @param sflags Flags of allocation for \p s. + * @param cflags Flags of allocation for \p c. + * @param sstart Start of allocation for \p s. + * @param cstart Start of allocation for \p c. + * @return Status of allocation. */ -vm_t alloc_shared_uvmem(struct tcb *r, size_t size, vmflags_t flags); +stat_t alloc_shared_uvmem(struct tcb *s, struct tcb *c, size_t size, + vmflags_t sflags, vmflags_t cflags, + vm_t *sstart, vm_t *cstart); /** * Reference shared user virtual memory. -- cgit v1.3