diff options
| author | Tom Tromey | 2012-08-15 12:56:38 -0600 |
|---|---|---|
| committer | Tom Tromey | 2012-08-15 12:56:38 -0600 |
| commit | 68b32482437e05f0994c4dd0ab5b0c27d39f0f6d (patch) | |
| tree | fe01584b00d03559210438ebc608a1d170ee00b3 /src/thread.c | |
| parent | 5190da91e6ca41287190693a8999a6919a9cd8e6 (diff) | |
| download | emacs-68b32482437e05f0994c4dd0ab5b0c27d39f0f6d.tar.gz emacs-68b32482437e05f0994c4dd0ab5b0c27d39f0f6d.zip | |
This introduces a thread-state object and moves various C globals
there. It also introduces #defines for these globals to avoid a
monster patch.
The #defines mean that this patch also has to rename a few fields
whose names clash with the defines.
There is currently just a single "thread"; so this patch does not
impact Emacs behavior in any significant way.
Diffstat (limited to 'src/thread.c')
| -rw-r--r-- | src/thread.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/thread.c b/src/thread.c new file mode 100644 index 00000000000..0bd97b4fd8e --- /dev/null +++ b/src/thread.c | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* Threading code. | ||
| 2 | Copyright (C) 2012 Free Software Foundation, Inc. | ||
| 3 | |||
| 4 | This file is part of GNU Emacs. | ||
| 5 | |||
| 6 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 7 | it under the terms of the GNU General Public License as published by | ||
| 8 | the Free Software Foundation, either version 3 of the License, or | ||
| 9 | (at your option) any later version. | ||
| 10 | |||
| 11 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 14 | GNU General Public License for more details. | ||
| 15 | |||
| 16 | You should have received a copy of the GNU General Public License | ||
| 17 | along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | ||
| 18 | |||
| 19 | |||
| 20 | #include <config.h> | ||
| 21 | #include <setjmp.h> | ||
| 22 | #include "lisp.h" | ||
| 23 | |||
| 24 | struct thread_state the_only_thread; | ||
| 25 | |||
| 26 | struct thread_state *current_thread = &the_only_thread; | ||