]> git.eshelyaron.com Git - emacs.git/log
emacs.git
13 years agomake the minibuffer mutex recursive. other-branches/old-concurrency
Giuseppe Scrivano [Thu, 17 Feb 2011 11:29:17 +0000 (12:29 +0100)]
make the minibuffer mutex recursive.

14 years agoDefine the `mutexp' function.
Giuseppe Scrivano [Mon, 29 Mar 2010 09:52:46 +0000 (11:52 +0200)]
Define the `mutexp' function.

14 years agoAdd support for non-recursive mutexes.
Giuseppe Scrivano [Mon, 29 Mar 2010 09:31:08 +0000 (11:31 +0200)]
Add support for non-recursive mutexes.

make-mutex accepts a new parameter, if the value is non nil then the
mutex is recursive; by default a non-recursive mutex is created.

14 years agoFix problems caused by the last rebase.
Giuseppe Scrivano [Thu, 11 Mar 2010 12:10:11 +0000 (13:10 +0100)]
Fix problems caused by the last rebase.

14 years agoHandle exclusive access to the minibuffer using a mutex, remove inhibit-yield
Giuseppe Scrivano [Sat, 13 Feb 2010 00:09:42 +0000 (01:09 +0100)]
Handle exclusive access to the minibuffer using a mutex, remove inhibit-yield

14 years agoMutex object initial implementation.
Giuseppe Scrivano [Fri, 12 Feb 2010 23:42:25 +0000 (00:42 +0100)]
Mutex object initial implementation.

14 years agoRevert "Support more complex code blocks as argument to `run-in-thread"
Giuseppe Scrivano [Fri, 22 Jan 2010 01:39:51 +0000 (02:39 +0100)]
Revert "Support more complex code blocks as argument to `run-in-thread"

This reverts commit a54548174153cb02b366fe6164cf3aa30597759c.

14 years agoRemove blocal_getrealvalue
Giuseppe Scrivano [Thu, 14 Jan 2010 16:13:01 +0000 (17:13 +0100)]
Remove blocal_getrealvalue

14 years agoIf a no-let-bound buffer-local symbol's value is modified, propagate it.
Giuseppe Scrivano [Thu, 14 Jan 2010 11:19:45 +0000 (12:19 +0100)]
If a no-let-bound buffer-local symbol's value is modified, propagate it.

14 years agothe thread_yield return value considers blocked threads too
Giuseppe Scrivano [Thu, 14 Jan 2010 09:32:44 +0000 (10:32 +0100)]
the thread_yield return value considers blocked threads too

14 years agoxg_select uses thread_select
Giuseppe Scrivano [Thu, 14 Jan 2010 09:31:28 +0000 (10:31 +0100)]
xg_select uses thread_select

14 years agoFix gnus startup in a separate thread.
Giuseppe Scrivano [Wed, 13 Jan 2010 21:38:06 +0000 (22:38 +0100)]
Fix gnus startup in a separate thread.

14 years agolocal_var_alist_ is shared by threads.
Giuseppe Scrivano [Wed, 13 Jan 2010 17:01:21 +0000 (18:01 +0100)]
local_var_alist_ is shared by threads.

- buffer local values per-thread cleanup.
- any binding-testsuite.el test is completed successfully.

14 years agoCleanup
Giuseppe Scrivano [Tue, 12 Jan 2010 12:23:27 +0000 (13:23 +0100)]
Cleanup

14 years agoFix some binding-testsuite.el test cases when threads are used.
Giuseppe Scrivano [Mon, 11 Jan 2010 16:57:26 +0000 (17:57 +0100)]
Fix some binding-testsuite.el test cases when threads are used.

This one still fails:

(defvar binding-test-some-local 'some)

(defvar binding-test-buffer-A (get-buffer-create "A"))

(with-current-buffer binding-test-buffer-A
 (set (make-variable-buffer-local 'binding-test-some-local) 'local))

(run-in-thread '(with-current-buffer binding-test-buffer-A
                 (message "local: %s" binding-test-some-local)))
(while (yield))

14 years agoUse get_current_thread to retrieve the current thread object.
Giuseppe Scrivano [Mon, 11 Jan 2010 09:20:02 +0000 (10:20 +0100)]
Use get_current_thread to retrieve the current thread object.

14 years agoFix a bug introduced by recent changes
Giuseppe Scrivano [Mon, 11 Jan 2010 00:29:19 +0000 (01:29 +0100)]
Fix a bug introduced by recent changes

14 years agoUse the `realvalue' when the default binding is used.
Giuseppe Scrivano [Sun, 3 Jan 2010 22:40:23 +0000 (23:40 +0100)]
Use the `realvalue' when the default binding is used.

14 years agoUnbind thread-bound variables when the thread is terminated.
Giuseppe Scrivano [Sun, 3 Jan 2010 13:58:50 +0000 (14:58 +0100)]
Unbind thread-bound variables when the thread is terminated.

14 years agoPropagate buffer-local-variables changes to other threads.
Giuseppe Scrivano [Sun, 3 Jan 2010 04:01:10 +0000 (05:01 +0100)]
Propagate buffer-local-variables changes to other threads.

It is done in a quite expensive way, O(n^2) in the threads number.

14 years agoBuffer local variables per-thread almost work now
Giuseppe Scrivano [Sat, 2 Jan 2010 18:09:30 +0000 (19:09 +0100)]
Buffer local variables per-thread almost work now

A know problem is backward propagation.  A global buffer local
variable modified in a thread is not seen by other threads.

14 years agoUse the global value as initial realvalue.
Giuseppe Scrivano [Fri, 1 Jan 2010 13:08:47 +0000 (14:08 +0100)]
Use the global value as initial realvalue.

14 years agoHandle default value
Giuseppe Scrivano [Fri, 1 Jan 2010 01:10:06 +0000 (02:10 +0100)]
Handle default value

14 years agoFix gc segfault.
Giuseppe Scrivano [Thu, 31 Dec 2009 18:32:35 +0000 (19:32 +0100)]
Fix gc segfault.

14 years agoUse the buffer local value for symval forwarding
Giuseppe Scrivano [Thu, 31 Dec 2009 18:24:00 +0000 (19:24 +0100)]
Use the buffer local value for symval forwarding

14 years agoAvoid a double symval forwarding
Giuseppe Scrivano [Thu, 31 Dec 2009 13:42:56 +0000 (14:42 +0100)]
Avoid a double symval forwarding

14 years agoFix per-thread buffer-local variables
Giuseppe Scrivano [Thu, 31 Dec 2009 13:13:35 +0000 (14:13 +0100)]
Fix per-thread buffer-local variables

14 years agoFix make bootstrap
Giuseppe Scrivano [Thu, 31 Dec 2009 12:29:56 +0000 (13:29 +0100)]
Fix make bootstrap

14 years agonow realvalue is a Lisp_ThreadLocal
Giuseppe Scrivano [Thu, 31 Dec 2009 00:42:56 +0000 (01:42 +0100)]
now realvalue is a Lisp_ThreadLocal

14 years agoInitialize realvalue to sym->value.
Giuseppe Scrivano [Mon, 28 Dec 2009 22:25:57 +0000 (23:25 +0100)]
Initialize realvalue to sym->value.

14 years agoRemove control, l->thread_data can't be nil at this point.
Giuseppe Scrivano [Sun, 27 Dec 2009 21:03:19 +0000 (22:03 +0100)]
Remove control, l->thread_data can't be nil at this point.

14 years agoblocal_get_thread_data is not used before blocal_set_thread_data.
Giuseppe Scrivano [Sun, 27 Dec 2009 18:56:52 +0000 (19:56 +0100)]
blocal_get_thread_data is not used before blocal_set_thread_data.

14 years agoMove realvalue to thread_data.
Giuseppe Scrivano [Sat, 26 Dec 2009 18:36:46 +0000 (19:36 +0100)]
Move realvalue to thread_data.

14 years agoRename struct Lisp_Buffer_Local_Value `cdrs' member to `thread_data'.
Giuseppe Scrivano [Sat, 26 Dec 2009 16:55:04 +0000 (17:55 +0100)]
Rename struct Lisp_Buffer_Local_Value `cdrs' member to `thread_data'.

14 years agoInitial per-thread buffer local variables support.
Giuseppe Scrivano [Fri, 25 Dec 2009 00:06:41 +0000 (01:06 +0100)]
Initial per-thread buffer local variables support.

Now this example works well:

(progn
 (make-variable-buffer-local 'va)

 (defun tha ()
   (dolist (va '("AA" "AB" "AC" "AD" "AE"))
     (message "thread a: %s" va)
     (yield)
     (message "thread a: %s" va)))

 (defun thb ()
   (dolist (va '("BF" "BG" "BH" "BI" "BL"))
     (message "thread b: %s" va)
     (yield)
     (message "thread b: %s" va)))

 (with-current-buffer (get-buffer-create "a")
   (run-in-thread '(tha)))
 (thb))

14 years agoChange Lisp_Buffer_Local_Value representation.
Tom Tromey [Sun, 29 Nov 2009 20:12:13 +0000 (21:12 +0100)]
Change Lisp_Buffer_Local_Value representation.

This doesn't change semantics but prepares the way for per-thread
buffer-local bindings.

14 years agoDefine and use SET_PER_BUFFER_VALUE_RAW
Tom Tromey [Sun, 15 Nov 2009 04:44:54 +0000 (05:44 +0100)]
Define and use SET_PER_BUFFER_VALUE_RAW

14 years agoFix some elisp routines.
Giuseppe Scrivano [Wed, 11 Nov 2009 11:08:49 +0000 (12:08 +0100)]
Fix some elisp routines.

14 years agoSet the buffer after the lock is acquired.
Giuseppe Scrivano [Wed, 11 Nov 2009 10:00:09 +0000 (11:00 +0100)]
Set the buffer after the lock is acquired.

14 years agoRemove desired_buffer from the thread_state struct.
Giuseppe Scrivano [Wed, 11 Nov 2009 09:55:48 +0000 (10:55 +0100)]
Remove desired_buffer from the thread_state struct.

14 years agoRename buffer_cond to thread_cond.
Giuseppe Scrivano [Wed, 11 Nov 2009 09:36:26 +0000 (10:36 +0100)]
Rename buffer_cond to thread_cond.

14 years agoRemove the buffer-locking mechanism.
Giuseppe Scrivano [Mon, 9 Nov 2009 19:35:43 +0000 (20:35 +0100)]
Remove the buffer-locking mechanism.

14 years agoHandle the thread_notify_kill_buffer return code.
Giuseppe Scrivano [Thu, 8 Oct 2009 20:37:30 +0000 (22:37 +0200)]
Handle the thread_notify_kill_buffer return code.

14 years agoNotify threads when a buffer is killed.
Giuseppe Scrivano [Thu, 8 Oct 2009 20:30:44 +0000 (22:30 +0200)]
Notify threads when a buffer is killed.

14 years agoInitialize threads properly.
Tom Tromey [Tue, 6 Oct 2009 01:08:08 +0000 (03:08 +0200)]
Initialize threads properly.

Revert a few BUF_ changes to use direct field access.

14 years agoInhibit yield during a redisplay
Giuseppe Scrivano [Mon, 5 Oct 2009 18:28:54 +0000 (20:28 +0200)]
Inhibit yield during a redisplay

14 years ago`unbind_to' will restore the previous inhibit_yield status.
Giuseppe Scrivano [Mon, 5 Oct 2009 18:22:58 +0000 (20:22 +0200)]
`unbind_to' will restore the previous inhibit_yield status.

14 years agoUse ALLOCATE_PSEUDOVECTOR.
Tom Tromey [Fri, 2 Oct 2009 04:47:30 +0000 (06:47 +0200)]
Use ALLOCATE_PSEUDOVECTOR.

Restore an initialization in search.c.
(Still doesn't build.)

14 years agoMark `last_thing_searched' and `saved_last_thing_searched' before free unused memory.
Giuseppe Scrivano [Thu, 1 Oct 2009 13:22:27 +0000 (15:22 +0200)]
Mark `last_thing_searched' and `saved_last_thing_searched' before free unused memory.

14 years agoAllow to yield when buffer local variables are let-bound by a thread.
Giuseppe Scrivano [Wed, 30 Sep 2009 21:06:06 +0000 (23:06 +0200)]
Allow to yield when buffer local variables are let-bound by a thread.

14 years agoMake regular expression match data per-thread.
Tom Tromey [Tue, 29 Sep 2009 04:21:31 +0000 (06:21 +0200)]
Make regular expression match data per-thread.

14 years agominor updates to buffer-objfwd patch
Tom Tromey [Mon, 28 Sep 2009 15:45:02 +0000 (17:45 +0200)]
minor updates to buffer-objfwd patch

14 years agoMake buffer-objfwd variables work per-thread.
Tom Tromey [Mon, 28 Sep 2009 03:08:56 +0000 (05:08 +0200)]
Make buffer-objfwd variables work per-thread.

See hack-buffer-objfwd.el to see how this was done.

14 years agoSet the current_buffer properly.
Giuseppe Scrivano [Thu, 24 Sep 2009 21:51:33 +0000 (23:51 +0200)]
Set the current_buffer properly.

14 years agoDetach the thread when it is sleeping on `select'
Giuseppe Scrivano [Thu, 24 Sep 2009 14:50:30 +0000 (16:50 +0200)]
Detach the thread when it is sleeping on `select'

14 years agoUnlock the buffer on yields when buffer local variables are not bound by the thread.
Giuseppe Scrivano [Thu, 24 Sep 2009 10:36:48 +0000 (12:36 +0200)]
Unlock the buffer on yields when buffer local variables are not bound by the thread.

15 years agoYield to another thread if the subprocess has no data available.
Giuseppe Scrivano [Wed, 23 Sep 2009 13:25:49 +0000 (15:25 +0200)]
Yield to another thread if the subprocess has no data available.

15 years agoMove with-no-threads inside the let body block.
Giuseppe Scrivano [Tue, 22 Sep 2009 13:13:41 +0000 (15:13 +0200)]
Move with-no-threads inside the let body block.

15 years agoDefine the `with-no-threads' macro and use it in the read-* functions.
Giuseppe Scrivano [Mon, 21 Sep 2009 19:34:53 +0000 (21:34 +0200)]
Define the `with-no-threads' macro and use it in the read-* functions.

15 years agoFix a problem with the garbage collector, storing the stack top every
Giuseppe Scrivano [Mon, 21 Sep 2009 12:51:27 +0000 (14:51 +0200)]
Fix a problem with the garbage collector, storing the stack top every

time the running thread is blocked.

15 years agoRewrite the condition to wake-up the thread that locked the buffer. Also don't try...
Giuseppe Scrivano [Sat, 19 Sep 2009 22:28:05 +0000 (00:28 +0200)]
Rewrite the condition to wake-up the thread that locked the buffer. Also don't try to schedule a new thread when this is not possible.

15 years agoDefine with-new-thread macro.
Tom Tromey [Sat, 19 Sep 2009 22:02:05 +0000 (00:02 +0200)]
Define with-new-thread macro.

15 years agoCall error if thread creation failed.
Tom Tromey [Sat, 19 Sep 2009 21:59:51 +0000 (23:59 +0200)]
Call error if thread creation failed.

15 years agoRaise an error when the thread cannot be created correctly.
Giuseppe Scrivano [Sat, 19 Sep 2009 21:09:17 +0000 (23:09 +0200)]
Raise an error when the thread cannot be created correctly.

15 years agoImplementation of a custom threads scheduler. Try to wake-up the thread with a lock...
Giuseppe Scrivano [Sat, 19 Sep 2009 18:29:38 +0000 (20:29 +0200)]
Implementation of a custom threads scheduler. Try to wake-up the thread with a lock on the desired buffer, if it can't be done then use round-robin.

15 years agoMove all locking logic into thread.c.
Giuseppe Scrivano [Sat, 19 Sep 2009 14:09:32 +0000 (16:09 +0200)]
Move all locking logic into thread.c.

15 years agoWhen there are other active threads, yield returns t.
Giuseppe Scrivano [Sat, 19 Sep 2009 11:49:04 +0000 (13:49 +0200)]
When there are other active threads, yield returns t.

15 years agorun-in-thread accepts a new optional argument: nolock.
Giuseppe Scrivano [Fri, 18 Sep 2009 20:16:30 +0000 (22:16 +0200)]
run-in-thread accepts a new optional argument: nolock.

When it is no-nil the thread does not try to get a lock on the current
buffer before work on it.

With this change, the following example works quite smoothly; while
loading imap folders, gnus yields to another thread:

(load-library "gnus")

;; Redefine to use yield
(defun imap-send-command-wait (command &optional buffer)
 (imap-wait-for-tag (prog1 (imap-send-command command buffer) (yield)) buffer))

(progn
 (run-in-thread '(gnus) t)
 (dotimes (i 20)
   ;; yield is called automatically during a buffer-switch
   (message (format "I got here %i" i))))

15 years agoProtect from yield while waiting for keyboard input.
Giuseppe Scrivano [Fri, 18 Sep 2009 15:23:42 +0000 (17:23 +0200)]
Protect from yield while waiting for keyboard input.

15 years agoFix a problem introduced with 9541917a66e9ef59a64bfe19c0d4a6146e3433d3
Giuseppe Scrivano [Fri, 18 Sep 2009 14:27:28 +0000 (16:27 +0200)]
Fix a problem introduced with 9541917a66e9ef59a64bfe19c0d4a6146e3433d3

15 years agoBlock yield if garbage collecting can cause an abort.
Giuseppe Scrivano [Fri, 18 Sep 2009 10:51:14 +0000 (12:51 +0200)]
Block yield if garbage collecting can cause an abort.

15 years agoA new thread maintain the parent's buffer when the thread starts not after it entered...
Giuseppe Scrivano [Fri, 18 Sep 2009 10:43:01 +0000 (12:43 +0200)]
A new thread maintain the parent's buffer when the thread starts not after it entered in `global_lock'.

15 years agoBlock yield when input is blocked.
Giuseppe Scrivano [Fri, 18 Sep 2009 10:41:22 +0000 (12:41 +0200)]
Block yield when input is blocked.

15 years agoWhen Finhibit_yield is not-nil, allow access to any buffer from the
Giuseppe Scrivano [Fri, 18 Sep 2009 08:40:21 +0000 (10:40 +0200)]
When Finhibit_yield is not-nil, allow access to any buffer from the

current thread.  It is needed to avoid deadlocks or undesidered
threads switch.

This mechanism is implemented storing the previous buffer's owner and
restore it when the current thread releases the buffer.

15 years agoFix a bug introduced in ccdc353864000ec8f13cb64d95cd5774510fa302
Giuseppe Scrivano [Thu, 17 Sep 2009 22:25:52 +0000 (00:25 +0200)]
Fix a bug introduced in ccdc353864000ec8f13cb64d95cd5774510fa302

15 years agoUse `waitpid' to check if a process is still alive. The previous mechanism caused...
Giuseppe Scrivano [Thu, 17 Sep 2009 21:50:10 +0000 (23:50 +0200)]
Use `waitpid' to check if a process is still alive. The previous mechanism caused threads to hang.

15 years agoAllow access to the minibuffer only to a thread at time.
Giuseppe Scrivano [Thu, 17 Sep 2009 21:48:34 +0000 (23:48 +0200)]
Allow access to the minibuffer only to a thread at time.

15 years agoHonor the function return type.
Giuseppe Scrivano [Thu, 17 Sep 2009 21:39:25 +0000 (23:39 +0200)]
Honor the function return type.

15 years agoAvoid the access to NULL memory while gc marks.
Giuseppe Scrivano [Thu, 17 Sep 2009 21:38:24 +0000 (23:38 +0200)]
Avoid the access to NULL memory while gc marks.

15 years agoRemove assertion that does not seem valid anymore.
Giuseppe Scrivano [Thu, 17 Sep 2009 19:28:05 +0000 (21:28 +0200)]
Remove assertion that does not seem valid anymore.

15 years agoNow it is possible to disable threading using "inhibit-yield".
Giuseppe Scrivano [Thu, 17 Sep 2009 16:02:09 +0000 (18:02 +0200)]
Now it is possible to disable threading using "inhibit-yield".

It should be used in a similar way:

  (defmacro with-no-threading (&rest body)
    `(unwind-protect (inhibit-yield nil)
      (progn (inhibit-yield t)
               ,@body)))

15 years agoReflect last changes in the GDB script.
Giuseppe Scrivano [Thu, 17 Sep 2009 09:49:56 +0000 (11:49 +0200)]
Reflect last changes in the GDB script.

15 years agoSignals can be captured by any thread.
Giuseppe Scrivano [Thu, 17 Sep 2009 09:40:18 +0000 (11:40 +0200)]
Signals can be captured by any thread.

15 years agoInitialize a new buffer's owner to nil.
Giuseppe Scrivano [Wed, 16 Sep 2009 23:04:50 +0000 (01:04 +0200)]
Initialize a new buffer's owner to nil.

15 years agoSupport more complex code blocks as argument to `run-in-thread
Giuseppe Scrivano [Wed, 16 Sep 2009 14:14:32 +0000 (16:14 +0200)]
Support more complex code blocks as argument to `run-in-thread

It introduces this change:

 (defun tha ()
  ...)

 (run-in-thread 'tha)

becomes:
 (run-in-thread '(tha))

15 years agoFree the thread specdl. Bug introduced with c466c557f39fc71c10b16e93b484a83187780228.
Giuseppe Scrivano [Wed, 16 Sep 2009 13:07:59 +0000 (15:07 +0200)]
Free the thread specdl. Bug introduced with c466c557f39fc71c10b16e93b484a83187780228.

15 years agoRevert to the previous code.
Giuseppe Scrivano [Wed, 16 Sep 2009 12:52:07 +0000 (14:52 +0200)]
Revert to the previous code.

15 years agoCheck for `other_threads_p ()' in the inner loop too because this condition can chang...
Giuseppe Scrivano [Wed, 16 Sep 2009 11:23:35 +0000 (13:23 +0200)]
Check for `other_threads_p ()' in the inner loop too because this condition can change since the initial check.

15 years agoSolve some problems with memory cleanup.
Giuseppe Scrivano [Wed, 16 Sep 2009 09:49:06 +0000 (11:49 +0200)]
Solve some problems with memory cleanup.

Remove explicit calls to `xfree' but leave `lisp_malloc'ed memory to
the garbage collector.

Check for `pthread_create' errors and restore the previous situation
in case something went wrong.

15 years agoFix a segfault when m_current_buffer is NULL
Giuseppe Scrivano [Tue, 15 Sep 2009 22:21:10 +0000 (00:21 +0200)]
Fix a segfault when m_current_buffer is NULL

15 years agoInitialize stack_top when a new thread is created.
Giuseppe Scrivano [Tue, 15 Sep 2009 15:09:53 +0000 (17:09 +0200)]
Initialize stack_top when a new thread is created.

15 years agoRelease the current buffer when a thread exits.
Tom Tromey [Mon, 14 Sep 2009 22:30:43 +0000 (00:30 +0200)]
Release the current buffer when a thread exits.

15 years agoFix boundp and a bug in store_symval_forwarding.
Tom Tromey [Sun, 13 Sep 2009 19:18:03 +0000 (21:18 +0200)]
Fix boundp and a bug in store_symval_forwarding.

15 years agoFirst working draft of thread-local binding.
Tom Tromey [Fri, 11 Sep 2009 18:05:55 +0000 (20:05 +0200)]
First working draft of thread-local binding.

At least 2 of the 9 kinds of variable bindings should work ok --
defvaralias variables and ordinary variables.
All other kinds will exhibit weird behavior.
A simple program that works:

   (defvar zz t)
   (defvar buffer-a (get-buffer-create "zardoz"))

   (defun tha ()
     (dolist (v '("A" "B" "C" "D"))
(message "thread a: %s" v)
(yield))
     (setq zz nil))

   (defun thb ()
     (dolist (v '("E" "F" "G" "H" "I"))
(message "thread b: %s" v)
(yield)
))

   (with-current-buffer buffer-a
     (run-in-thread 'tha))
   (thb)

   (while zz
     (yield))

15 years agoFix another oversight in thread.c.
Tom Tromey [Fri, 11 Sep 2009 17:46:07 +0000 (19:46 +0200)]
Fix another oversight in thread.c.

15 years agoFix two bad bugs in thread.c.
Tom Tromey [Fri, 11 Sep 2009 17:17:46 +0000 (19:17 +0200)]
Fix two bad bugs in thread.c.

15 years agoInitial code for buffer locking.
Tom Tromey [Wed, 9 Sep 2009 21:50:06 +0000 (23:50 +0200)]
Initial code for buffer locking.

Add some buffer locking; does not yet actually work.
Make current_buffer per-thread.
Turn thread_state into a vectorlike.
Arrange to populate initial specpdl; put condition-case around
thread body.

15 years agoIntroduce threads.
Tom Tromey [Wed, 9 Sep 2009 21:38:04 +0000 (23:38 +0200)]
Introduce threads.

Add a new thread.c file.
Move selected globals to a thread-specific structure.
Add elisp functions run-in-thread and yield.
Update GC to work with threads.

15 years agoIntroduce thread-local object.
Tom Tromey [Wed, 9 Sep 2009 20:24:14 +0000 (22:24 +0200)]
Introduce thread-local object.

Add minimal support for it.

15 years agoRewrite globals to allow indirection in C.
Tom Tromey [Wed, 9 Sep 2009 19:45:59 +0000 (21:45 +0200)]
Rewrite globals to allow indirection in C.

The bulk of the patch was done by running rewrite-globals.el.
Then a couple minor fixes were applied by hand.