paul@181 | 1 | /* |
paul@181 | 2 | * Memory sharing abstractions. |
paul@181 | 3 | * |
paul@308 | 4 | * Copyright (C) 2018, 2019, 2021, 2022 Paul Boddie <paul@boddie.org.uk> |
paul@181 | 5 | * |
paul@181 | 6 | * This program is free software; you can redistribute it and/or |
paul@181 | 7 | * modify it under the terms of the GNU General Public License as |
paul@181 | 8 | * published by the Free Software Foundation; either version 2 of |
paul@181 | 9 | * the License, or (at your option) any later version. |
paul@181 | 10 | * |
paul@181 | 11 | * This program is distributed in the hope that it will be useful, |
paul@181 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
paul@181 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
paul@181 | 14 | * GNU General Public License for more details. |
paul@181 | 15 | * |
paul@181 | 16 | * You should have received a copy of the GNU General Public License |
paul@181 | 17 | * along with this program; if not, write to the Free Software |
paul@181 | 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, |
paul@181 | 19 | * Boston, MA 02110-1301, USA |
paul@181 | 20 | */ |
paul@181 | 21 | |
paul@181 | 22 | #pragma once |
paul@181 | 23 | |
paul@181 | 24 | #include <l4/re/c/dataspace.h> |
paul@308 | 25 | #include <l4/re/c/rm.h> |
paul@181 | 26 | #include <l4/sys/types.h> |
paul@181 | 27 | |
paul@181 | 28 | EXTERN_C_BEGIN |
paul@181 | 29 | |
paul@181 | 30 | long ipc_allocate(unsigned long size, void **addr, l4re_ds_t *ds); |
paul@308 | 31 | |
paul@308 | 32 | long ipc_allocate_align(unsigned long size, l4re_rm_flags_t flags, |
paul@308 | 33 | unsigned char align, void **addr, l4re_ds_t *ds); |
paul@308 | 34 | |
paul@181 | 35 | long ipc_new_dataspace(l4_cap_idx_t cap, l4_mword_t size, l4_umword_t flags, l4_umword_t align); |
paul@308 | 36 | |
paul@181 | 37 | long ipc_attach_dataspace(l4re_ds_t ds, unsigned long size, void **addr); |
paul@308 | 38 | |
paul@308 | 39 | long ipc_attach_dataspace_align(l4re_ds_t ds, unsigned long size, |
paul@308 | 40 | l4re_rm_flags_t flags, unsigned char align, |
paul@308 | 41 | void **addr); |
paul@308 | 42 | |
paul@181 | 43 | long ipc_detach_dataspace(void *addr); |
paul@308 | 44 | |
paul@181 | 45 | long ipc_dataspace_size(l4_cap_idx_t cap, unsigned long *size); |
paul@181 | 46 | |
paul@181 | 47 | EXTERN_C_END |