From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: Concurrency via isolated process/thread Date: Thu, 06 Jul 2023 20:58:48 +0800 Message-ID: <877crdjiwn.fsf@yahoo.com> References: <871qhnr4ty.fsf@localhost> <83v8ezk3cj.fsf@gnu.org> <87v8ezpov0.fsf@localhost> <83r0pnk2az.fsf@gnu.org> <87pm57pns8.fsf@localhost> <87lefvp55t.fsf@yahoo.com> <87sfa28ura.fsf@localhost> <87cz16o8vz.fsf@yahoo.com> <87jzve8r4m.fsf@localhost> <871qhmo5nv.fsf@yahoo.com> <87bkgq8p5t.fsf@localhost> <831qhmjwk0.fsf@gnu.org> <875y6y8nlr.fsf@localhost> <87h6qhnalc.fsf@yahoo.com> <87ilax71wo.fsf@localhost> <878rbtkz2c.fsf@yahoo.com> <87a5w96x2o.fsf@localhost> <87jzvdjjp4.fsf@yahoo.com> <877crd6w53.fsf@localhost> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31030"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , emacs-devel@gnu.org To: Ihor Radchenko Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Jul 06 15:00:04 2023 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 1qHOaY-0007rf-N6 for ged-emacs-devel@m.gmane-mx.org; Thu, 06 Jul 2023 15:00:02 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qHOZb-0002Uq-1A; Thu, 06 Jul 2023 08:59:03 -0400 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 1qHOZZ-0002UN-Bt for emacs-devel@gnu.org; Thu, 06 Jul 2023 08:59:01 -0400 Original-Received: from sonic311-23.consmr.mail.ne1.yahoo.com ([66.163.188.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qHOZX-0000am-Bj for emacs-devel@gnu.org; Thu, 06 Jul 2023 08:59:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688648337; bh=2E8k1u8WeHivHFSnzgxHj8R4SUcWsddeLSINug+4Bvs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From:Subject:Reply-To; b=S6tY7puBv/snPyskCD06F1PlqSv21HHQ4dGJ/N3hO+NckE2BpqPre67mhKzXIRsDoKmNDhX7d9KGXQddLP2nfya29R7K9/YCUKH2FkdiZTiE9Dh42o/JpRhkYXnBMauw2X9PNgg4O6Yb4+lkBgKghosSQnQKNjqxd7iFhPZQ0X2I4tQF5OJNMcTfTMsqhJjLCSDURAGd0kBJeU5IIyYZgpZCY6an/0zHHtXykqUEvBWd3xUPEdz6/1tJkLj7hdfG1ViD3oMrd2tE1i1drYf4aQ1D+fMvGvtlwseOsvC7r/5ZC0735T/L5XWZSq5Ehy0mmMD2YopaVh7PGRYdd89k6Q== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688648337; bh=n48am2i87IKDoMj6uGMyAYP+vknOBFhn91yXffWgII6=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=rBTFhK5MV6Mooc1bHS03NE3nUvbcHejMKj2q5DuBV2nYRsgoKNwbA7+6j7uXARnHEqKQVY/kCNSgBNwGvq4hOGn789eHsMGu1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YLbKPXHV1bkGJQ3Z_XOEiG49Svdoq7nWyrWpco7Ja X-Sonic-MF: X-Sonic-ID: f296c0f8-81af-4d38-ae8d-8e1b84838c65 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic311.consmr.mail.ne1.yahoo.com with HTTP; Thu, 6 Jul 2023 12:58:57 +0000 Original-Received: by hermes--production-sg3-67fd64777-bps25 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e2c4767e149736cbdd41b17b56fadf85; Thu, 06 Jul 2023 12:58:54 +0000 (UTC) In-Reply-To: <877crd6w53.fsf@localhost> (Ihor Radchenko's message of "Thu, 06 Jul 2023 12:51:20 +0000") X-Mailer: WebService/1.1.21638 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.188.204; envelope-from=luangruo@yahoo.com; helo=sonic311-23.consmr.mail.ne1.yahoo.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, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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:307503 Archived-At: Ihor Radchenko writes: > Po Lu writes: > >>> LOCK_OBJECT (foo); >>> LOCK_OBJECT (XCAR (foo)); >> ... >> This is unnecessary. Loads and stores of Lisp_Object values are cache >> coherent except on 32 bit systems --with-wide-int. XCAR (foo) will >> always load one of the values previously written. > > Do you mean that locking XCAR (foo) is unnecessary when foo is locked? No, that there is no need to lock a cons (or a vector, or anything else with a fixed number of Lisp_Object slots) before reading or writing to it.