all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: "Gerd Möllmann" <gerd@gnu.org>, emacs-devel@gnu.org
Subject: Re: scratch/igc fe90d556834: Make glyphs ambiguous roots
Date: Mon, 29 Jul 2024 09:21:07 +0200	[thread overview]
Message-ID: <m2frrszmsc.fsf@pro2.fritz.box> (raw)
In-Reply-To: <87h6c8lnva.fsf@gmail.com> (Helmut Eller's message of "Mon, 29 Jul 2024 08:21:29 +0200")

Helmut Eller <eller.helmut@gmail.com> writes:

> On Sun, Jul 28 2024, Gerd Moellmann wrote:
>
>>     We cannot trace glyphs in fix_window because we don't have exclusive
>>     access to glyph_rows and glyphs. (An optimal solution would allocate
>>     glyphs from MPS, and change data structures in a way that everything
>>     needed (row->used, row->enabled_p) is available for the scanner.)
>
> I don't understand this.  Glyph_rows aren't allocated in MPS-managed
> memory so there are no memory barriers to worry about.

True.

> While fix_frame runs, all other threads are suspended.

I don't think that is guranteed. but please check.

Frames are not roots, so fix_frame can only assume exclusive access to
the frame struct itself. Other threads can work on glyph_rows, glyphs
and so on while fix_frame runs.

> So why don't we have exclusive access? And why is it not a problem for
> FRAME_FONT, FRAME_DISPLAY_INFO, etc?

FRAME_X_DISPLAY_INFO has the same problem. It's just that I had the
glyphs on my todo list. With frame->font I don't see a problem. Fonts
are pvecs so we only have to fix the pointer to it, and fix_font should
do the rest.

BTW, unrelated. Do you observe problems in clear_face_cache? I'm getting
EXC_BAD_ACCESS from accessing face->font->driver, sometimes, as if the
face hadn't been scanned. But the face looks okay, as far as the
face_cache is concerned. Happens since I change the default font to
JetBrains Mono. (And happened before that change above.)



  reply	other threads:[~2024-07-29  7:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <172218853212.17772.9043342656088870281@vcs2.savannah.gnu.org>
     [not found] ` <20240728174212.BDB66C41F13@vcs2.savannah.gnu.org>
2024-07-29  6:21   ` scratch/igc fe90d556834: Make glyphs ambiguous roots Helmut Eller
2024-07-29  7:21     ` Gerd Möllmann [this message]
2024-07-29  9:21       ` Helmut Eller
2024-07-29 10:19         ` Gerd Möllmann
2024-07-29 13:12           ` Gerd Möllmann
2024-07-29 14:01             ` Helmut Eller
2024-07-29 14:12               ` Gerd Möllmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2frrszmsc.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=eller.helmut@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=gerd@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.