qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3 16/23] bsd-user: Implment madvise(2) to match the linux-us


From: Richard Henderson
Subject: Re: [PATCH v3 16/23] bsd-user: Implment madvise(2) to match the linux-user implementation.
Date: Mon, 11 Sep 2023 16:56:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0

On 9/9/23 12:36, Karim Taha wrote:
Signed-off-by: Signed-off-by: Karim Taha<kariem.taha2.7@gmail.com>
---
  bsd-user/bsd-mem.h            | 53 +++++++++++++++++++++++++++++++++++
  bsd-user/freebsd/os-syscall.c |  4 +++
  bsd-user/syscall_defs.h       |  2 ++
  3 files changed, 59 insertions(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>


+    switch (advice) {
+    case MADV_DONTNEED:
+        if (page_check_range(start, len, PAGE_PASSTHROUGH)) {
+            ret = get_errno(madvise(g2h_untagged(start), len, advice));
+            if ((advice == MADV_DONTNEED) && (ret == 0)) {

Duplicate check for MADV_DONTNEED.
Useless parenthesis.


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]