diff options
author | Tom Tromey <tromey@redhat.com> | 2013-08-26 08:46:30 -0600 |
---|---|---|
committer | Tom Tromey <tromey@redhat.com> | 2013-08-26 08:46:30 -0600 |
commit | 2ee7755c8d35aba1d598c9baa910bd5af228f095 (patch) | |
tree | 0eb4817057fef64fb07767f8b025b4d47fb80cb6 /src/systhread.c | |
parent | 793ea5055aea85ff9227e1bf0c84ab37edba7201 (diff) | |
download | emacs-2ee7755c8d35aba1d598c9baa910bd5af228f095.tar.gz |
implement --enable-threads and a thread-less mode
Diffstat (limited to 'src/systhread.c')
-rw-r--r-- | src/systhread.c | 77 |
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 @@ /* System thread definitions - Copyright (C) 2012 Free Software Foundation, Inc. + Copyright (C) 2012, 2013 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -20,7 +20,80 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ #include <setjmp.h> #include "lisp.h" -#ifdef HAVE_PTHREAD +#ifndef THREADS_ENABLED + +void +sys_mutex_init (sys_mutex_t *m) +{ + *m = 0; +} + +void +sys_mutex_lock (sys_mutex_t *m) +{ +} + +void +sys_mutex_unlock (sys_mutex_t *m) +{ +} + +void +sys_mutex_destroy (sys_mutex_t *m) +{ +} + +void +sys_cond_init (sys_cond_t *c) +{ + *c = 0; +} + +void +sys_cond_wait (sys_cond_t *c, sys_mutex_t *m) +{ +} + +void +sys_cond_signal (sys_cond_t *c) +{ +} + +void +sys_cond_broadcast (sys_cond_t *c) +{ +} + +void +sys_cond_destroy (sys_cond_t *c) +{ +} + +sys_thread_t +sys_thread_self (void) +{ + return 0; +} + +int +sys_thread_equal (sys_thread_t x, sys_thread_t y) +{ + return x == y; +} + +int +sys_thread_create (sys_thread_t *t, const char *name, + thread_creation_function *func, void *datum) +{ + return 0; +} + +void +sys_thread_yield (void) +{ +} + +#elif defined (HAVE_PTHREAD) #include <sched.h> |