aboutsummaryrefslogtreecommitdiffstats
path: root/src/systhread.c
diff options
context:
space:
mode:
authorTom Tromey2013-08-26 08:46:30 -0600
committerTom Tromey2013-08-26 08:46:30 -0600
commit2ee7755c8d35aba1d598c9baa910bd5af228f095 (patch)
tree0eb4817057fef64fb07767f8b025b4d47fb80cb6 /src/systhread.c
parent793ea5055aea85ff9227e1bf0c84ab37edba7201 (diff)
downloademacs-2ee7755c8d35aba1d598c9baa910bd5af228f095.tar.gz
emacs-2ee7755c8d35aba1d598c9baa910bd5af228f095.zip
implement --enable-threads and a thread-less mode
Diffstat (limited to 'src/systhread.c')
-rw-r--r--src/systhread.c77
1 files changed, 75 insertions, 2 deletions
diff --git a/src/systhread.c b/src/systhread.c
index ab647528452..8c9ec438d96 100644
--- a/src/systhread.c
+++ b/src/systhread.c
@@ -1,5 +1,5 @@
1/* System thread definitions 1/* System thread definitions
2 Copyright (C) 2012 Free Software Foundation, Inc. 2 Copyright (C) 2012, 2013 Free Software Foundation, Inc.
3 3
4This file is part of GNU Emacs. 4This file is part of GNU Emacs.
5 5
@@ -20,7 +20,80 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
20#include <setjmp.h> 20#include <setjmp.h>
21#include "lisp.h" 21#include "lisp.h"
22 22
23#ifdef HAVE_PTHREAD 23#ifndef THREADS_ENABLED
24
25void
26sys_mutex_init (sys_mutex_t *m)
27{
28 *m = 0;
29}
30
31void
32sys_mutex_lock (sys_mutex_t *m)
33{
34}
35
36void
37sys_mutex_unlock (sys_mutex_t *m)
38{
39}
40
41void
42sys_mutex_destroy (sys_mutex_t *m)
43{
44}
45
46void
47sys_cond_init (sys_cond_t *c)
48{
49 *c = 0;
50}
51
52void
53sys_cond_wait (sys_cond_t *c, sys_mutex_t *m)
54{
55}
56
57void
58sys_cond_signal (sys_cond_t *c)
59{
60}
61
62void
63sys_cond_broadcast (sys_cond_t *c)
64{
65}
66
67void
68sys_cond_destroy (sys_cond_t *c)
69{
70}
71
72sys_thread_t
73sys_thread_self (void)
74{
75 return 0;
76}
77
78int
79sys_thread_equal (sys_thread_t x, sys_thread_t y)
80{
81 return x == y;
82}
83
84int
85sys_thread_create (sys_thread_t *t, const char *name,
86 thread_creation_function *func, void *datum)
87{
88 return 0;
89}
90
91void
92sys_thread_yield (void)
93{
94}
95
96#elif defined (HAVE_PTHREAD)
24 97
25#include <sched.h> 98#include <sched.h>
26 99