From: Eli Zaretskii <eliz@gnu.org>
To: Helmut Eller <eller.helmut@gmail.com>
Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org
Subject: Re: MPS prstack
Date: Mon, 27 May 2024 16:12:51 +0300 [thread overview]
Message-ID: <86ed9nv1nw.fsf@gnu.org> (raw)
In-Reply-To: <87ed9nmnsm.fsf@gmail.com> (message from Helmut Eller on Mon, 27 May 2024 14:39:37 +0200)
> From: Helmut Eller <eller.helmut@gmail.com>
> Cc: gerd.moellmann@gmail.com, emacs-devel@gnu.org
> Date: Mon, 27 May 2024 14:39:37 +0200
>
> On Mon, May 27 2024, Eli Zaretskii wrote:
>
> >> But my question was more whether MPS actually does call scan_prstack at
> >> "any moment" or if this is just a theoretical possibility for some
> >> possible future version of MPS.
> >
> > Why is all this order important, can you elaborate? Neither MPS nor
> > we can rely on the order in which the generated code does this stuff,
> > AFAIU.
>
> It is important because scan_prstack only scans the region
> prstack.stack[0..prstack.sp] and because scan_prstack runs (potentially)
> concurrent to print_stack_push.
>
> If print_stack_push increments prstack.sp before initializing
> prstack.stack[prstack.sp], then scan_prstack may read the old value out
> of that slot.
If we need to make sure that "prstack.stack[prstack.sp++] = e;" is
done atomically, maybe we can use the __atomic builtins (see the node
"__atomic Builtins" in the GCC manual).
next prev parent reply other threads:[~2024-05-27 13:12 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-20 17:54 MPS prstack Helmut Eller
2024-05-20 18:21 ` Gerd Möllmann
2024-05-20 18:32 ` Helmut Eller
2024-05-21 3:30 ` Gerd Möllmann
2024-05-22 16:27 ` Helmut Eller
2024-05-22 17:55 ` Gerd Möllmann
2024-05-24 14:17 ` Helmut Eller
2024-05-24 14:27 ` Gerd Möllmann
2024-05-25 13:45 ` Gerd Möllmann
2024-05-27 7:27 ` Helmut Eller
2024-05-27 8:43 ` Gerd Möllmann
2024-05-27 9:15 ` Helmut Eller
2024-05-27 9:47 ` Gerd Möllmann
2024-05-27 11:45 ` Eli Zaretskii
2024-05-27 12:39 ` Helmut Eller
2024-05-27 13:12 ` Eli Zaretskii [this message]
2024-05-27 14:15 ` Helmut Eller
2024-05-27 14:37 ` Mattias Engdegård
2024-05-27 14:54 ` Helmut Eller
2024-05-27 14:43 ` Po Lu
2024-05-27 15:08 ` Helmut Eller
2024-05-27 11:34 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86ed9nv1nw.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=eller.helmut@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=gerd.moellmann@gmail.com \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).