From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Helmut Eller Newsgroups: gmane.emacs.devel Subject: Re: SIGPROF + SIGCHLD and igc Date: Sat, 28 Dec 2024 20:28:05 +0100 Message-ID: <87v7v3mwu2.fsf@gmail.com> References: <87o713wwsi.fsf@telefonica.net> <87ttaucub8.fsf@protonmail.com> <87pllicrpi.fsf@protonmail.com> <864j2u442i.fsf@gnu.org> <87a5ch5z1b.fsf@gmail.com> <87plld5pev.fsf@protonmail.com> <87ed1t6r34.fsf@gmail.com> <875xn46s6z.fsf@gmail.com> <86bjwwulnc.fsf@gnu.org> <877c7jlxsu.fsf@gmail.com> <86frm7sx4d.fsf@gnu.org> <87a5cfoivh.fsf@gmail.com> <867c7jsoat.fsf@gnu.org> <8734i7of3h.fsf@gmail.com> <8634i7skeg.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39925"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: pipcet@protonmail.com, gerd.moellmann@gmail.com, ofv@wanadoo.es, emacs-devel@gnu.org, acorallo@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Dec 28 20:28:21 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 1tRcU0-000AGm-HO for ged-emacs-devel@m.gmane-mx.org; Sat, 28 Dec 2024 20:28:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRcTt-0003Bn-Qd; Sat, 28 Dec 2024 14:28:13 -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 1tRcTs-0003Bc-2f for emacs-devel@gnu.org; Sat, 28 Dec 2024 14:28:12 -0500 Original-Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRcTo-0003wV-RP; Sat, 28 Dec 2024 14:28:11 -0500 Original-Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-5d3ecae02beso9794725a12.0; Sat, 28 Dec 2024 11:28:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735414086; x=1736018886; darn=gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=R2DplJi8qbS0aWKl5uto/4SJiGBMh8S4nvTCoCbsgto=; b=TfnZD9PmYWrZWNKvnj4asyaWtdluLjLRZiupfyp5MeAo2QwfmUpZHU2qrD/+F/ONsh GBzpUHLhCsfKDxXf29ZWnFzO9dmg1oTJ6LUCglE7A9UxBbR332mXi7JpevbSQyu3ttDn BdLAL3bTXSWTBECo6kMB9k8JxML/R3Afz72/D3SlRuTV6MidWv0McdcFAZuNhEOjKprB Al1Y0PqdeeD5h76WoqE2fDs/N4cti89qz2dilr9am1quMzJu3tq4hUTO0jvsn+9GLEfH N2xmv97o0w0G2feW48X0e5jimWCdSND9eY+TUmuqc+lrr7QL/9vAtMrumYjsZiSSPFar OIRA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735414086; x=1736018886; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=R2DplJi8qbS0aWKl5uto/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== X-Received: by 2002:a05:6402:3594:b0:5d7:ea25:c72f with SMTP id 4fb4d7f45d1cf-5d81ddfbf03mr24277718a12.25.1735414086071; Sat, 28 Dec 2024 11:28:06 -0800 (PST) Original-Received: from caladan ([31.177.115.143]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80676f192sm12871185a12.35.2024.12.28.11.28.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 28 Dec 2024 11:28:05 -0800 (PST) In-Reply-To: <8634i7skeg.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 28 Dec 2024 21:00:07 +0200") Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=eller.helmut@gmail.com; helo=mail-ed1-x52a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:327292 Archived-At: On Sat, Dec 28 2024, Eli Zaretskii wrote: > I guess they use PTHREAD_MUTEX_ERRORCHECK to get the error? Yes, they do. > Anyway, the MS-Windows implementation uses EnterCriticalSection, which > allows a thread to call it any number of times after the first call > succeeded, so they must be using something else on Windows to detect > multiple locks by the same thread, maybe the count of claims or > something? The comment at the beginning of lockw3.c suggests so. I think the AVER assertions are only checked in the debug build. * .design: These are implemented using critical sections. * See the section titled "Synchronization functions" in the Groups * chapter of the Microsoft Win32 API Programmer's Reference. * The "Synchronization" section of the Overview is also relevant. * * Critical sections support recursive locking, so the implementation * could be trivial. This implementation counts the claims to provide * extra checking. * * The limit on the number of recursive claims is the max of * ULONG_MAX and the limit imposed by critical sections, which * is believed to be about UCHAR_MAX. * * During use the claims field is updated to remember the number of * claims acquired on a lock. This field must only be modified * while we are inside the critical section.