aboutsummaryrefslogtreecommitdiffstats
path: root/src/thread.h
diff options
context:
space:
mode:
authorKen Raeburn2015-11-01 01:42:21 -0400
committerKen Raeburn2015-11-01 01:42:21 -0400
commit39372e1a1032521be74575bb06f95a3898fbae30 (patch)
tree754bd242a23d2358ea116126fcb0a629947bd9ec /src/thread.h
parent6a3121904d76e3b2f63007341d48c5c1af55de80 (diff)
parente11aaee266da52937a3a031cb108fe13f68958c3 (diff)
downloademacs-39372e1a1032521be74575bb06f95a3898fbae30.tar.gz
emacs-39372e1a1032521be74575bb06f95a3898fbae30.zip
merge from trunk
Diffstat (limited to 'src/thread.h')
-rw-r--r--src/thread.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/src/thread.h b/src/thread.h
index 2b9963423db..d155837ccad 100644
--- a/src/thread.h
+++ b/src/thread.h
@@ -51,16 +51,11 @@ struct thread_state
51 waiting on. */ 51 waiting on. */
52 Lisp_Object event_object; 52 Lisp_Object event_object;
53 53
54 /* m_gcprolist must be the first non-lisp field. */ 54 /* m_byte_stack_list must be the first non-lisp field. */
55 /* Recording what needs to be marked for gc. */
56 struct gcpro *m_gcprolist;
57#define gcprolist (current_thread->m_gcprolist)
58
59 /* A list of currently active byte-code execution value stacks. 55 /* A list of currently active byte-code execution value stacks.
60 Fbyte_code adds an entry to the head of this list before it starts 56 Fbyte_code adds an entry to the head of this list before it starts
61 processing byte-code, and it removed the entry again when it is 57 processing byte-code, and it removed the entry again when it is
62 done. Signalling an error truncates the list analoguous to 58 done. Signalling an error truncates the list. */
63 gcprolist. */
64 struct byte_stack *m_byte_stack_list; 59 struct byte_stack *m_byte_stack_list;
65#define byte_stack_list (current_thread->m_byte_stack_list) 60#define byte_stack_list (current_thread->m_byte_stack_list)
66 61
@@ -83,9 +78,8 @@ struct thread_state
83 struct handler *m_handlerlist; 78 struct handler *m_handlerlist;
84#define handlerlist (current_thread->m_handlerlist) 79#define handlerlist (current_thread->m_handlerlist)
85 80
86 /* Count levels of GCPRO to detect failure to UNGCPRO. */ 81 struct handler *m_handlerlist_sentinel;
87 int m_gcpro_level; 82#define handlerlist_sentinel (current_thread->m_handlerlist_sentinel)
88#define gcpro_level (current_thread->m_gcpro_level)
89 83
90 /* Current number of specbindings allocated in specpdl. */ 84 /* Current number of specbindings allocated in specpdl. */
91 ptrdiff_t m_specpdl_size; 85 ptrdiff_t m_specpdl_size;
@@ -234,11 +228,11 @@ extern void init_threads_once (void);
234extern void init_threads (void); 228extern void init_threads (void);
235extern void syms_of_threads (void); 229extern void syms_of_threads (void);
236 230
237typedef int select_func (int, SELECT_TYPE *, SELECT_TYPE *, SELECT_TYPE *, 231typedef int select_func (int, fd_set *, fd_set *, fd_set *,
238 EMACS_TIME *, sigset_t *); 232 struct timespec *, sigset_t *);
239 233
240int thread_select (select_func *func, int max_fds, SELECT_TYPE *rfds, 234int thread_select (select_func *func, int max_fds, fd_set *rfds,
241 SELECT_TYPE *wfds, SELECT_TYPE *efds, EMACS_TIME *timeout, 235 fd_set *wfds, fd_set *efds, struct timespec *timeout,
242 sigset_t *sigmask); 236 sigset_t *sigmask);
243 237
244bool thread_check_current_buffer (struct buffer *); 238bool thread_check_current_buffer (struct buffer *);