From 3e6ea05611ea8b1c9956ba608313d032e8a0fb00 Mon Sep 17 00:00:00 2001 From: Martin Decky Date: Mon, 15 Apr 2024 00:00:00 +0000 Subject: [PATCH] Remove confusing comments Without an explanation (which is not even present in the original commit message), the remarks about locking the current task being unnecessary is confusing at best. The basic understanding of the code actually suggests that locking the current task is essential for the mutual exclusion in the mapping and unmapping routines. Change-Id: Ia83231367bb0e4c987b75a31fdde38501e43c543 --- src/kern/task.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/kern/task.cpp b/src/kern/task.cpp index f93e4ada..5e4e9b99 100644 --- a/src/kern/task.cpp +++ b/src/kern/task.cpp @@ -445,7 +445,6 @@ Task::sys_map(L4_fpage::Rights rights, Syscall_frame *f, Utcb *utcb) // always take lock from task with the lower memory address first Lock_guard_2 guard; - // FIXME: avoid locking the current task, it is not needed if (!guard.check_and_lock(&existence_lock, &from->existence_lock)) return commit_result(-L4_err::EInval); @@ -481,7 +480,6 @@ Task::sys_unmap(Syscall_frame *f, Utcb *utcb) Ref_ptr self(this); Lock_guard guard; - // FIXME: avoid locking the current task, it is not needed if (!guard.check_and_lock(&existence_lock)) return commit_error(utcb, L4_error::Not_existent);