1.1 --- a/libipc/lib/src/mem_ipc.c Thu Mar 07 22:41:40 2024 +0100
1.2 +++ b/libipc/lib/src/mem_ipc.c Thu Mar 07 23:50:26 2024 +0100
1.3 @@ -1,7 +1,7 @@
1.4 /*
1.5 * Memory sharing abstractions.
1.6 *
1.7 - * Copyright (C) 2018, 2019, 2021, 2022 Paul Boddie <paul@boddie.org.uk>
1.8 + * Copyright (C) 2018, 2019, 2021, 2022, 2024 Paul Boddie <paul@boddie.org.uk>
1.9 *
1.10 * This program is free software; you can redistribute it and/or
1.11 * modify it under the terms of the GNU General Public License as
1.12 @@ -20,6 +20,7 @@
1.13 */
1.14
1.15 #include <l4/re/c/mem_alloc.h>
1.16 +#include <l4/re/c/rm.h> /* L4RE_RM_F_* */
1.17 #include <l4/sys/err.h>
1.18 #include <l4/sys/types.h>
1.19
1.20 @@ -37,14 +38,14 @@
1.21
1.22 /* Generic memory allocation. */
1.23
1.24 -long ipc_allocate(unsigned long size, void **addr, l4re_ds_t *ds)
1.25 +long ipc_allocate(unsigned long size, void **addr, l4_cap_idx_t *ds)
1.26 {
1.27 return ipc_allocate_align(size, L4RE_RM_F_SEARCH_ADDR | L4RE_RM_F_RW,
1.28 L4_PAGESHIFT, addr, ds);
1.29 }
1.30
1.31 long ipc_allocate_align(unsigned long size, l4re_rm_flags_t flags,
1.32 - unsigned char align, void **addr, l4re_ds_t *ds)
1.33 + unsigned char align, void **addr, l4_cap_idx_t *ds)
1.34 {
1.35 /* Allocate and attach the memory for the dataspace. */
1.36
1.37 @@ -66,7 +67,7 @@
1.38 /* Create a dataspace. Equivalent to l4re_ma_alloc_align. */
1.39
1.40 long ipc_new_dataspace(l4_mword_t size, l4_umword_t flags, l4_umword_t align,
1.41 - l4re_ds_t *ds)
1.42 + l4_cap_idx_t *ds)
1.43 {
1.44 /* Allocate a capability for the dataspace. */
1.45
1.46 @@ -80,14 +81,14 @@
1.47
1.48 /* Attach a dataspace region. Similar to l4re_rm_attach. */
1.49
1.50 -long ipc_attach_dataspace(l4re_ds_t ds, unsigned long size, void **addr)
1.51 +long ipc_attach_dataspace(l4_cap_idx_t ds, unsigned long size, void **addr)
1.52 {
1.53 return ipc_attach_dataspace_align(ds, size, L4RE_RM_F_SEARCH_ADDR | L4RE_RM_F_RW,
1.54 L4_PAGESHIFT, addr);
1.55 }
1.56
1.57 -long ipc_attach_dataspace_align(l4re_ds_t ds, unsigned long size,
1.58 - l4re_rm_flags_t flags, unsigned char align,
1.59 +long ipc_attach_dataspace_align(l4_cap_idx_t ds, unsigned long size,
1.60 + rm_flags_t flags, unsigned char align,
1.61 void **addr)
1.62 {
1.63 long err;