aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc.c
diff options
context:
space:
mode:
authorTom Tromey2012-08-15 13:09:32 -0600
committerTom Tromey2012-08-15 13:09:32 -0600
commit1dcacbc64721b1a4de58aa36460b0a39e766be63 (patch)
tree98a07fba97225221d3bcfab970070b5a6a6564d6 /src/alloc.c
parent60a9d2a7728895c1a5bfbc37c3bfa8fde35abe61 (diff)
downloademacs-1dcacbc64721b1a4de58aa36460b0a39e766be63.tar.gz
emacs-1dcacbc64721b1a4de58aa36460b0a39e766be63.zip
This adds most of the thread features visible to emacs lisp.
I roughly followed the Bordeaux threads API: http://trac.common-lisp.net/bordeaux-threads/wiki/ApiDocumentation ... but not identically. In particular I chose not to implement interrupt-thread or destroy-thread, but instead a thread-signalling approach. I'm still undecided about *default-special-bindings* (which I did not implement). I think it would be more emacs-like to capture the let bindings at make-thread time, but IIRC Stefan didn't like this idea the first time around. There are one or two semantics issues pointed out in the patch where I could use some advice.
Diffstat (limited to 'src/alloc.c')
-rw-r--r--src/alloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/alloc.c b/src/alloc.c
index dfae2d1ef67..69742a325d1 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -3102,6 +3102,9 @@ sweep_vectors (void)
3102 ptrdiff_t nbytes = PSEUDOVECTOR_NBYTES (vector); 3102 ptrdiff_t nbytes = PSEUDOVECTOR_NBYTES (vector);
3103 ptrdiff_t total_bytes = nbytes; 3103 ptrdiff_t total_bytes = nbytes;
3104 3104
3105 if (PSEUDOVECTOR_TYPEP (&vector->header, PVEC_THREAD))
3106 finalize_one_thread ((struct thread_state *) vector);
3107
3105 next = ADVANCE (vector, nbytes); 3108 next = ADVANCE (vector, nbytes);
3106 3109
3107 /* While NEXT is not marked, try to coalesce with VECTOR, 3110 /* While NEXT is not marked, try to coalesce with VECTOR,