[Top][All Lists]

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

Re: Using the GNU GMP Library for Bignums in Emacs

From: Paul Eggert
Subject: Re: Using the GNU GMP Library for Bignums in Emacs
Date: Sun, 22 Apr 2018 21:21:02 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

Richard Stallman wrote:
There are quite a few places in the C code of Emacs
where execution can get stuck; that's why I added immediate quitting.
The problems I fixed that way have all come back.

I hope they haven't come back. We tried to be methodical about preventing Emacs from getting stuck.

What was the reason for this change?

Allowing immediate quitting from arbitrary points in execution causes problems when Emacs internals assume that actions are done in a certain order and are not just partly done when interrupted by a quit. In the old days we could assume that execution order at the machine level was the same order as in the C program source code, which meant that as long as the C source code did things in the right order Emacs could survive immediate quitting. That assumption is no longer true. To do things safely now, we need to either (1) add critical sections to Emacs where appropriate, or (2) test the quit flag at appropriate intervals. In practice (2) is easier to implement and to maintain.

reply via email to

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