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: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 17:15:10 +0200 Message-ID: <86o70tnqwx.fsf@gnu.org> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <87h66loc17.fsf@gmail.com> <878qrxoayj.fsf@gmail.com> <8734i5o6wc.fsf@gmail.com> <87cyh9mpn5.fsf@gmail.com> <874j2l1hei.fsf@protonmail.com> <874j2lmd37.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21287"; mail-complaints-to="usenet@ciao.gmane.io" Cc: pipcet@protonmail.com, gerd.moellmann@gmail.com, spd@toadstyle.org, emacs-devel@gnu.org To: Helmut Eller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 16:16:16 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 1tSHV8-0005O8-Vz for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 16:16:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSHUo-0006bL-Uv; Mon, 30 Dec 2024 10:15:54 -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 1tSHUn-0006bD-1v for emacs-devel@gnu.org; Mon, 30 Dec 2024 10:15:53 -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 1tSHUi-0000as-Ur; Mon, 30 Dec 2024 10:15:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=uAyIBIJqmodDVYnBNnPTaZZWgTs6H+iUZNQQHlLz/vE=; b=P2cq/DvJ0tZIJ956r6RR d/ZbOaGiZknw0TWiR/sfkUTsXBlgcB3oorh8xHd0PYivkq7AGDGZgjXYuzsbRhiDEZNRgdkKg2uq/ iLFRBV9WGK4iQ7LuoYfELzQsXig08dG4XwkG8jK3L2YrezzrxkNS+R6J6PCn51sg/xFo9NNX4l2cO x/MEFkgaqGblozB7yn36bcjQ12lGubcs5thtpBHOoxJCGZ8y+dwUVKLJbaiypLyTAJl40nECh3Dnf dRbrTNK03t3TS+Hsqkrq0qecbj/QTp0PhsAbuUn6ZVZQXoqmv3aN6tkbKmOondNtU4qGgegMQJQGi suX6KTTDF8/y3Q==; In-Reply-To: <874j2lmd37.fsf@gmail.com> (message from Helmut Eller on Mon, 30 Dec 2024 15:59:08 +0100) 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:327439 Archived-At: > From: Helmut Eller > Cc: Gerd Möllmann , Eli > Zaretskii , > spd@toadstyle.org, emacs-devel@gnu.org > Date: Mon, 30 Dec 2024 15:59:08 +0100 > > if (mps_arena_busy ()) > plog->gc_count = saturated_add (plog->gc_count, count); > else > record_backtrace (plog, count); > > is safe. If we don't hold the lock, then mps_arena_busy returns false > and we can access memory. We are safe even if another thread has > claimed the lock by the time that we reach record_backtrace: the SIGPROF > handler will just block until the lock is released. Which other thread could have claimed the lock?