From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Some experience with the igc branch Date: Sun, 29 Dec 2024 15:52:03 +0200 Message-ID: <8634i6r3zw.fsf@gnu.org> References: <87o713wwsi.fsf@telefonica.net> <8734ia79jq.fsf@protonmail.com> <86pllexwru.fsf@gnu.org> <87ldw15h6s.fsf@protonmail.com> <86a5chw20u.fsf@gnu.org> <871pxt5b8u.fsf@protonmail.com> <865xn3sn2e.fsf@gnu.org> <871pxrecy7.fsf@protonmail.com> <86pllbqakj.fsf@gnu.org> <87frm6d5pa.fsf@protonmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3808"; mail-complaints-to="usenet@ciao.gmane.io" Cc: gerd.moellmann@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun Dec 29 14:53:00 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tRtj2-0000pk-0k for ged-emacs-devel@m.gmane-mx.org; Sun, 29 Dec 2024 14:53:00 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRtiE-0004Ba-IB; Sun, 29 Dec 2024 08:52:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRtiC-0004B8-Ct for emacs-devel@gnu.org; Sun, 29 Dec 2024 08:52:08 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tRtiB-0004Ji-BZ; Sun, 29 Dec 2024 08:52:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NN/n08w4vf1LoSoVYhM8ADS05oTuvuqrGWeah8k03J4=; b=JZZFC+OeDZN2 rg+2F9RiMhO0nrtMx6bUroEYVklLi/ealojd7lm/O0N0Ymgbwsy0g5hv93z0BESPvkNZlktCqkKaw 285MkXSl63Im45jgizP8FEKa7leP+3SM3A5j7D0R9x+aDwgDZwwlK5SeIsUqp/DkU7Z25RP/saMbs 4bi7/W/ZKL5CzyaMSpwi8QBw0eS7rQZ1Ln8V2pd3KuvFPCeKnbTnNh3rVMcaSmc8NvZGDRpnpju+p AIxjXOBB6kJHXLP4Yicj7q35bZTUdfH7GzTV24ZWObPBCjWCEDn4dibE/2EhcPACFfDxtqpNfah5D pawf/MuuSsA9TRVaFhC8BQ==; In-Reply-To: <87frm6d5pa.fsf@protonmail.com> (message from Pip Cet on Sun, 29 Dec 2024 12:39:53 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:327336 Archived-At: > Date: Sun, 29 Dec 2024 12:39:53 +0000 > From: Pip Cet > Cc: gerd.moellmann@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, eller.helmut@gmail.com, acorallo@gnu.org > > >> Instead, we call the SIGSEGV handler directly on the other thread, > >> passing in the same siginfo structure. > > > > How can we call the SIGSEGV handler directly from another thread? And > > It's a C function. We call it. We need to know its name or its address to do that. It is not our function. > > how will that thread know it needs to call the handler in the first > > place? > > We'd like to just use pthread_cond_signal, but to be POSIXly correct we > need to do so from another thread. Ouch! > >> > how will it know which MPS function to call? > >> > >> The MPS SIGSEGV handler is obtained by calling sigaction. > > > > That's unreliable: it assumes that no one else calls sigaction after > > MPS, or changes the chain of handlers in some other way. > > It merely assumes that any such modifications call our signal handler > with the right arguments, which is precisely what MPS assumes anyway. Sorry, I don't follow. We need to know the address of the handler before the signal happens, no? So how calling our handler is relevant? > > Also, on MS-Windows MPS doesn't use a signal handler (because there > > are no signals on Windows, really). It uses an exception handler, and > > Can exception handlers be interrupted by emulated signals running on the > same stack? Emulated signals cannot possibly run in the same thread, because they must be asynchronous events.