[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Concurrency via isolated process/thread

From: Ihor Radchenko
Subject: Re: Concurrency via isolated process/thread
Date: Tue, 25 Jul 2023 09:27:03 +0000

Po Lu <luangruo@yahoo.com> writes:

>> Sure, but the whole chapter design shows that READ_ONCE/WRITE_ONCE is
>> not the best design. They go deep and complex just to avoid using it too
>> much.
> That's because READ_ONCE and WRITE_ONCE both have additional semantics
> beyond ensuring that loads and stores are coherently propagated and
> received to and from other CPUs.  For example, the compiler is not
> allowed to merge loads and stores, although it and the CPU are both
> allowed to reorder them.
> We don't have similar requirements in Emacs.

I've seen a couple of volatile variables in the code.
So, there is at least some fighting with GCC optimizations going on.

Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]