mmap: Implement the minial but reasonable mlock/munlock/mprotect

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: I538e0d78ecd0680374a2e0f56adbc61d7a4e6d1f
This commit is contained in:
Xiang Xiao
2021-06-24 02:29:19 +08:00
committed by Masayuki Ishikawa
parent ec30d6ef6b
commit 06215be327
3 changed files with 67 additions and 3 deletions
+1 -2
View File
@@ -132,8 +132,7 @@ FAR void *mmap(FAR void *start, size_t length, int prot, int flags,
* logic is not in place.
*/
if (prot == PROT_NONE ||
(flags & (MAP_FIXED | MAP_DENYWRITE)) != 0)
if ((flags & (MAP_FIXED | MAP_DENYWRITE)) != 0)
{
ferr("ERROR: Unsupported options, prot=%x flags=%04x\n", prot, flags);
ret = -ENOSYS;