zephyr/lib/posix/options/mprotect.c
Chris Friedt 2d4346ba53 posix: implement mprotect()
Provide a stub for mprotect() to satisfy the requirement for the
base definitions / system interfaces and subsequently PSE51,
PSE52, PSE52, etc.

Currently, Zephyr's virtual memory-management API does not seem
to support modifying memory protection bits after pages have
already been mapped.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-06-14 14:01:05 -04:00

22 lines
328 B
C

/*
* Copyright (c) 2024, Tenstorrent AI ULC
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <errno.h>
#include <stddef.h>
#include <sys/types.h>
#include <zephyr/posix/sys/mman.h>
int mprotect(void *addr, size_t len, int prot)
{
ARG_UNUSED(addr);
ARG_UNUSED(len);
ARG_UNUSED(prot);
errno = ENOSYS;
return -1;
}