aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.c
diff options
context:
space:
mode:
authorTom Tromey2012-08-15 12:56:38 -0600
committerTom Tromey2012-08-15 12:56:38 -0600
commit68b32482437e05f0994c4dd0ab5b0c27d39f0f6d (patch)
treefe01584b00d03559210438ebc608a1d170ee00b3 /src/thread.c
parent5190da91e6ca41287190693a8999a6919a9cd8e6 (diff)
downloademacs-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.c26
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
4This file is part of GNU Emacs.
5
6GNU Emacs is free software: you can redistribute it and/or modify
7it under the terms of the GNU General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11GNU Emacs is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU General Public License for more details.
15
16You should have received a copy of the GNU General Public License
17along 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
24struct thread_state the_only_thread;
25
26struct thread_state *current_thread = &the_only_thread;