qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC] linux-user: Remove stale "not threadsafe" comments


From: Laurent Vivier
Subject: Re: [RFC] linux-user: Remove stale "not threadsafe" comments
Date: Tue, 1 Mar 2022 20:31:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

Le 14/01/2022 à 16:50, Peter Maydell a écrit :
In linux-user/signal.c we have two FIXME comments claiming that
parts of the signal-handling code are not threadsafe. These are
very old, as they were first introduced in commit 624f7979058
in 2008. Since then we've radically overhauled the signal-handling
logic, while carefully preserving these FIXME comments.

It's unclear exactly what thread-safety issue the original
author was trying to point out -- the relevant data structures
are in the TaskStruct, which makes them per-thread and only
operated on by that thread. The old code at the time of that
commit did have various races involving signal handlers being
invoked at awkward times; possibly this was what was meant.

Delete these FIXME comments:
  * they were written at a time when the way we handled
    signals was completely different
  * the code today appears to us to not have thread-safety issues
  * nobody knows what the problem the comments were trying to
    point out was
so they are serving no useful purpose for us today.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Marked "RFC" because I'm a bit uneasy with deleting FIXMEs
simply because I can't personally figure out why they're
there. This patch is more to start a discussion to see
if anybody does understand the issue -- in which case we
can instead augment the comments to describe it.
---
  linux-user/signal.c | 2 --
  1 file changed, 2 deletions(-)

Applied to my linux-user-for-7.0 branch.

Thanks,
Laurent




reply via email to

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