summaryrefslogtreecommitdiff
path: root/src/process.h
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2012-08-15 13:19:24 -0600
committerTom Tromey <tromey@redhat.com>2012-08-15 13:19:24 -0600
commit6c0d5ae50789673f53c834084bbe1f62f5a62731 (patch)
tree0f976b74b292b2a4714470eebb2ce39548d47678 /src/process.h
parentaa14ccd1e2edec2735f9200a4f2e5eee3b0abe09 (diff)
downloademacs-6c0d5ae50789673f53c834084bbe1f62f5a62731.tar.gz
process changes
This changes wait_reading_process_output to handle threads better. It introduces a wrapper for select that releases the global lock, and it ensures that only a single thread can select a given file descriptor at a time. This also adds the thread-locking feature to processes. By default a process can only have its output accepted by the thread that created it. This can be changed using set-process-thread. (If the thread exits, the process is again available for waiting by any thread.) Note that thread-signal will not currently interrupt a thread blocked on select. I'll fix this later.
Diffstat (limited to 'src/process.h')
-rw-r--r--src/process.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/process.h b/src/process.h
index 43cc7ea33c0..1ddfe915357 100644
--- a/src/process.h
+++ b/src/process.h
@@ -103,6 +103,9 @@ struct Lisp_Process
Lisp_Object gnutls_cred_type;
#endif
+ /* The thread a process is linked to, or nil for any thread. */
+ Lisp_Object thread;
+
/* After this point, there are no Lisp_Objects any more. */
/* alloc.c assumes that `pid' is the first such non-Lisp slot. */
@@ -208,3 +211,5 @@ extern void add_read_fd (int fd, fd_callback func, void *data);
extern void delete_read_fd (int fd);
extern void add_write_fd (int fd, fd_callback func, void *data);
extern void delete_write_fd (int fd);
+
+extern void update_processes_for_thread_death (Lisp_Object);