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: igc, macOS avoiding signals Date: Mon, 30 Dec 2024 19:33:37 +0100 Message-ID: <87jzbhyq9q.fsf@gmail.com> References: <799DDBC5-2C14-4476-B1E0-7BA2FE9E7901@toadstyle.org> <8734i5o6wc.fsf@gmail.com> <87cyh9mpn5.fsf@gmail.com> <874j2l1hei.fsf@protonmail.com> <874j2lmd37.fsf@gmail.com> <87msgdkt29.fsf@gmail.com> <87jzbhxdt0.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7989"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Gerd =?utf-8?Q?M=C3=B6llmann?= , Eli Zaretskii , spd@toadstyle.org, emacs-devel@gnu.org To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 30 19:34:26 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 1tSKav-00020B-Rp for ged-emacs-devel@m.gmane-mx.org; Mon, 30 Dec 2024 19:34:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tSKaF-0005Zw-KV; Mon, 30 Dec 2024 13:33:43 -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 1tSKaE-0005Zg-Ky for emacs-devel@gnu.org; Mon, 30 Dec 2024 13:33:42 -0500 Original-Received: from mail-ed1-x52e.google.com ([2a00:1450:4864:20::52e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tSKaC-00051c-VI; Mon, 30 Dec 2024 13:33:42 -0500 Original-Received: by mail-ed1-x52e.google.com with SMTP id 4fb4d7f45d1cf-5d414b8af7bso18366903a12.0; Mon, 30 Dec 2024 10:33:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735583618; x=1736188418; 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=P8bK4SWz93kbzddS803F39gxAEoYoaf0TaCeq0+5Zdg=; b=lefazIltTam1skRXJWj4gxvr5Ak6IYH6eSTMKWTbXVi13yMry5kUAEJz85m14AcQnR 1GNfLI8mcqbX4iGft75uJ4D5a6U6htdnUNnYBhtbey5BK8006NttVyEH6sKUxQqDAWdY xBFVZtjlFKEE/qmnMMYFR8GSNdVuGT5XHLwfNjChmFYpfthYOOYWOXPcyDYeHJmpbrO7 gX4XvlUCh+ngUHFTZaa+wxVd57m6ntLdhlhE86r6/R/h0ZrhVSihatpKiHLcIo97+HzN N4mFe0n1eZ/KngnyIHP0GY4xOoVSsWiZgjHrHGcKPWA8L/Fq0dFZBKZtUBKluiGIpepb Di5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735583618; x=1736188418; 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=P8bK4SWz93kbzddS803F39gxAEoYoaf0TaCeq0+5Zdg=; b=giiixZwfV+WLhbk5cMhGN/xPN9Y2ZN347C5SZIhUUeG6QMRXKA1c6nATXpSlIuhHJ3 c/9O6aZe0tcKa085iclVcMtKJmqWmau+xF64H8ofbKkMuCP9viKLLEJhNm4aYFsqFeZi cNIOsv2tnz298BjsxKZAkU/pwCifBf5+Oy1jlvlbiS14TX4ls+OlLgqcV5928ojNw4K+ +J42C3wV891rhvtcmQmOU3n4jt2QXlJQgSsQAwBpxXOIdSoubXZN2ljPNlV9yd0qlXn2 uOSXk4lMD0mudW46TZvC95g65Xggtsq2ay04M/c2cQyOiY/51BdGgU+dCXCAFJsfm/k8 BsyA== X-Forwarded-Encrypted: i=1; AJvYcCVnqncAkIrJlGnbsKPW9jV/MwMCUHzMsTA5wCvLDqsUDIrZKmPiMTt3pihZ7RXma1CE7Kw/wwAwn6sdRFQ=@gnu.org, AJvYcCWxrQ4/lc0h98S5B/SGfqmpGPTsObUxaG5Ncerp6n4X+UMokzDgVcLlBULDdB/s5CCOEa0t@gnu.org X-Gm-Message-State: AOJu0YwW/SkcZE494otEqZYoOlUKfupFIXmhPIW8hzAAZ16VnLZBnltB X4pyTT+9BjVRJ8vqZonKNLimx2Bar1C0IPR+eZDXr2kpRBzt9G7UzxGB0F1m X-Gm-Gg: ASbGncte8QZBH/l8ynWGJAGG3ymJ/4G89pZ4qmNg3CShogvpaCsttWkfFFTKejA+Aww TE+yll5A/pVVt/w/DDRgIWEP0Yhaja4NBV10BTX6THW/62IqvtiN6Q36uDp2nAcZCJHzFmQ8XPf tf7eOmDl7fIEC8uy9rAUymMxbhmLVEYJ9unosKwfBFJaSYn0sVbm56IwI1Hx8cD+zM+j/vHqWK+ OIOwBtrlfsDreZpp2wZOGeU5BiiCXyXg3FAYa1nSWXoUhn34vu3qGY= X-Google-Smtp-Source: AGHT+IE5fHgj2UglBg0Z+6FmTHcFIq9fQ97vc0ArrAwpMjI24bNsBdqwiJVBpbmGERv9ses6A9afEw== X-Received: by 2002:a05:6402:35d6:b0:5d0:f9f1:cd73 with SMTP id 4fb4d7f45d1cf-5d81ddf3befmr34370030a12.13.1735583618221; Mon, 30 Dec 2024 10:33:38 -0800 (PST) Original-Received: from caladan ([31.177.115.143]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5d80675a466sm15003412a12.4.2024.12.30.10.33.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2024 10:33:37 -0800 (PST) In-Reply-To: <87jzbhxdt0.fsf@protonmail.com> (Pip Cet's message of "Mon, 30 Dec 2024 17:49:09 +0000") Received-SPF: pass client-ip=2a00:1450:4864:20::52e; envelope-from=eller.helmut@gmail.com; helo=mail-ed1-x52e.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:327462 Archived-At: 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