1 /* 2 * Copyright (c) 2024, Tenstorrent AI ULC 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <stddef.h> 8 9 #include <zephyr/kernel.h> 10 #include <zephyr/posix/sys/mman.h> 11 mlock(const void * addr,size_t len)12int mlock(const void *addr, size_t len) 13 { 14 k_mem_pin(addr, len); 15 16 return 0; 17 } 18 munlock(const void * addr,size_t len)19int munlock(const void *addr, size_t len) 20 { 21 k_mem_unpin(addr, len); 22 23 return 0; 24 } 25