From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?utf-8?Q?Gerd_M=C3=B6llmann?= Newsgroups: gmane.emacs.devel Subject: Re: MPS: scroll-bars Date: Mon, 06 May 2024 17:53:40 +0200 Message-ID: References: <875xvvp3fo.fsf@gmail.com> <87r0eicht1.fsf_-_@gmail.com> <87plu29lcc.fsf@yahoo.com> <87fruyccs8.fsf@gmail.com> <878r0q9dzd.fsf@yahoo.com> <87a5l4r8xu.fsf@gmail.com> <86jzk8cipc.fsf@gnu.org> <87jzk8p26y.fsf@gmail.com> <86bk5kceq6.fsf@gnu.org> <86jzk7aslr.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="28860"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: eller.helmut@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 06 17:54:32 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 1s40fe-0007HS-Lm for ged-emacs-devel@m.gmane-mx.org; Mon, 06 May 2024 17:54:30 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s40ey-0000KY-6e; Mon, 06 May 2024 11:53:48 -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 1s40ew-0000KA-G7 for emacs-devel@gnu.org; Mon, 06 May 2024 11:53:46 -0400 Original-Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s40eu-00077T-QR; Mon, 06 May 2024 11:53:46 -0400 Original-Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-a599eedc8eeso456735866b.1; Mon, 06 May 2024 08:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715010822; x=1715615622; 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=67ed6qYC4RFh40o9J2QDBuxuu0K8Wf06LcbiJPAObHM=; b=M/lR/doaIKc7EI/YgAEBg47kuicdIOOpfqXXfCuD8FtVjHLb1P5bLXasEHRb8786KG hMAv0pEctQm/RULoKuM2xKWkB4xcVMpjVqcj4D6UcUHssKqfO906myImbU4nHm4FAZxo VE/K1lMyoH15hTUdtWIPrjQ3U6guO2CpAa6FxO5m7tU+TFzKXNcPJieNEUq2MvLYEaV7 +TNWoJARzUwb2XfmtcPOE3Vzz0GzexhGkWJG8AMkR1WvbrbpnaOJQYNhVUEoCGeQD5b/ jtOlUMq2L/GzBFlH2/amCuZyh9CyVgVcmnNDXig2WkQNZX87kXmJJmudHvwaEnG+/XaH ezzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715010822; x=1715615622; 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=67ed6qYC4RFh40o9J2QDBuxuu0K8Wf06LcbiJPAObHM=; b=IfHgnjYoQ1OsbrUuwUyNqNGzukVJgDXb+C0OseWbJ5eO2NI0M0zKfR2Dinz4L5cXXt 4xM0C5rDqnSZ4qiVB84BD8x5jUyKjJi65QykwMhQxY4G7SVTp9zNnxFBzROOPxPvkzs3 K1WnlKRVu+QGRzBQyBYxdfn3qJ9zkUx8vWJcHebiPxTCc2RD3jjoOuTJ0ShOxnD/ofxH /omFXW6wui74Jnm63sqek5ZgU1GbC6BvZek1znda4UYefgHHR22TbTzTXitJK1o9/Jht NQYdiM6WD3TTbYjwuU1bQm5hH+pK1rCD/KWxQIij5S1Dn3WqeeZiQ0wfuCZOxsRDfrdi CkFA== X-Forwarded-Encrypted: i=1; AJvYcCV4uoGUz8VaINvyqLnQIDbKKMQey2r0loey7IyP4C5UOzJb2uQFbE9Igm6M4jaRf4CdfqNet5FVXg+z1/+uCtpWklBP X-Gm-Message-State: AOJu0YwQ3EtP50EpxzxE35qG3K9OAvHjL7fuaxNnjhbJm3U6898tzovR jNWvVqL1MB+qwBAt7Uyi8ZK+GVpblpEVtGx9rd7JOMawiHsMf8TUy0z+Xw== X-Google-Smtp-Source: AGHT+IH86pWtcbuXLy8ltk1MlR8p0XZZTfRNFDKDkeZveWSbepgam2hpyRHLUAGU6yBe252+EqAWYQ== X-Received: by 2002:a17:907:97d5:b0:a59:c3a5:4ded with SMTP id js21-20020a17090797d500b00a59c3a54dedmr3250132ejc.13.1715010821654; Mon, 06 May 2024 08:53:41 -0700 (PDT) Original-Received: from pro2.fritz.box (p4fe3a55e.dip0.t-ipconnect.de. [79.227.165.94]) by smtp.gmail.com with ESMTPSA id my37-20020a1709065a6500b00a59ae892a68sm2795827ejc.167.2024.05.06.08.53.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 May 2024 08:53:41 -0700 (PDT) In-Reply-To: <86jzk7aslr.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 06 May 2024 18:05:20 +0300") Received-SPF: pass client-ip=2a00:1450:4864:20::629; envelope-from=gerd.moellmann@gmail.com; helo=mail-ej1-x629.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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:318904 Archived-At: Eli Zaretskii writes: >> Date: Sun, 05 May 2024 21:09:53 +0300 >> From: Eli Zaretskii >> Cc: gerd.moellmann@gmail.com, luangruo@yahoo.com, emacs-devel@gnu.org >> >> > From: Helmut Eller >> > Cc: gerd.moellmann@gmail.com, luangruo@yahoo.com, emacs-devel@gnu.org >> > Date: Sun, 05 May 2024 20:02:13 +0200 >> > >> > On Sun, May 05 2024, Eli Zaretskii wrote: >> > >> > > Can you tell, for my own education, what does a call to >> > > igc_xzalloc_ambig give us, as opposed to just xzalloc? >> > >> > igc_xzalloc_ambig allocates memory like xzalloc but it addition >> > registers it as root. When MPS starts scanning, it begins from the >> > roots. That means, we are sure that the referenced objects stay alive. >> > In the case of ambiguous references, the objects are also pinned >> > (i.e. don't move). >> > >> > That pinning part is not necessary for the scroll-bar case, but >> > igc_xzalloc_ambig is currently the easiest to use function available in >> > igc.h. >> >> Thanks, I think I get this. > > Btw, did we decide what to do with these chains: > > struct frame > { > [...] > /* List of scroll bars on this frame. > Actually, we don't specify exactly what is stored here at all; the > scroll bar implementation code can use it to store anything it likes. > This field is marked by the garbage collector. It is here > instead of in the `device' structure so that the garbage > collector doesn't need to look inside the window-system-dependent > structure. */ > Lisp_Object scroll_bars; > Lisp_Object condemned_scroll_bars; > > They are doubly-linked lists via the ->next and ->prev fields in the C > 'struct scroll_bar', in X as well as w32, see XSCROLL_BAR. The > Lisp_Object's above are the last scroll bar on the frame's windows, > and the rest are reachable via the ->next and ->prev pointers. Do we > need to do anything about those ->next and ->prev pointers? For NS, and I must always add that I don't know NS at all, the condemned_scroll_bars are fine I think. NS sets a flag in an NS EmacsScroller object to condemn/redeem it, and doesn't use the frame's field, says clangd. The scroll_bars field was something strange. It didn't contain struct scroll_bars but someting like optimized Lisp_Misc_Ptrs (see xmint_pointer in lisp.h) which point to EmacsScrollers. In summary, I came for NS to the conclusion that we should be good with what we currently have. Famous last words.