[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: igc, macOS avoiding signals
From: |
Helmut Eller |
Subject: |
Re: igc, macOS avoiding signals |
Date: |
Mon, 30 Dec 2024 19:33:37 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
On Mon, Dec 30 2024, Pip Cet wrote:
>> Theoretically, a signal handler could interrupt the Emacs thread and
>> lock the mutex without unlocking it.
>
> I don't think that's a problem. Here's why:
>
> We'd have to call the POSIX police. I believe it's a conscious POSIX
> decision not to allow hand-over of locks from one thread/signal handler
> (those can't even call _trylock) to another;
Do you mean, it is not allowed to call pthread_mutex_trylock in a signal
handler?
[...]
> But anyway, POSIX prohibits it, glibc on GNU/Linux doesn't support it,
> I'm not aware of any other systems making that useful, certainly not for
> Emacs.
>
>> That would be a very unusual signal handler. I hope no other
>> surprises happen in signal handlers.
>
> longjmp-based green threads? (MPS currently assumes a simple linear
> stack, gcc can produce split-stack code, getting that combination to
> work would be good; I can dig up the patch for enabling it for the old
> GC).
I think MPS would require a special thread module that can handle green
threads. Probably nothing we have to worry about.
Helmut
- Re: igc, macOS avoiding signals, (continued)
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Helmut Eller, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Eli Zaretskii, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals,
Helmut Eller <=
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30
- Re: igc, macOS avoiding signals, Pip Cet, 2024/12/30
- Re: igc, macOS avoiding signals, Gerd Möllmann, 2024/12/30