diff options
| author | Alan Third | 2017-07-01 12:58:49 +0100 |
|---|---|---|
| committer | Alan Third | 2017-07-01 12:58:49 +0100 |
| commit | 0ad5fd4b6cac1824e50e5e8c1a43878825e7d3de (patch) | |
| tree | 0a8247163987e1c146583554fdbe508a435f6705 /src/process.c | |
| parent | ff6d090ff73af57d6d489bc221d8f9eb6c0da633 (diff) | |
| download | emacs-0ad5fd4b6cac1824e50e5e8c1a43878825e7d3de.tar.gz emacs-0ad5fd4b6cac1824e50e5e8c1a43878825e7d3de.zip | |
Fix threads on NS (bug#25265)
src/nsterm.h (ns_select): Compiler doesn't like sigmask being const.
(ns_run_loop_break) [HAVE_PTHREAD]: New function.
src/nsterm.m (ns_select): Call thread_select from within ns_select.
(ns_run_loop_break) [HAVE_PTHREAD]: New function.
(ns_send_appdefined): Don't wait for main thread when sending app
defined event.
src/process.c (wait_reading_process_output): Call thread_select from
within ns_select.
src/systhread.c (sys_cond_broadcast) [HAVE_NS]: Break ns_select out of
its event loop using ns_run_loop_break.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/process.c b/src/process.c index 2a1c2eecde3..abd017bb907 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5371,14 +5371,13 @@ wait_reading_process_output (intmax_t time_limit, int nsecs, int read_kbd, | |||
| 5371 | nfds = xg_select (max_desc + 1, | 5371 | nfds = xg_select (max_desc + 1, |
| 5372 | &Available, (check_write ? &Writeok : 0), | 5372 | &Available, (check_write ? &Writeok : 0), |
| 5373 | NULL, &timeout, NULL); | 5373 | NULL, &timeout, NULL); |
| 5374 | #elif defined HAVE_NS | ||
| 5375 | /* And NS builds call thread_select in ns_select. */ | ||
| 5376 | nfds = ns_select (max_desc + 1, | ||
| 5377 | &Available, (check_write ? &Writeok : 0), | ||
| 5378 | NULL, &timeout, NULL); | ||
| 5374 | #else /* !HAVE_GLIB */ | 5379 | #else /* !HAVE_GLIB */ |
| 5375 | nfds = thread_select ( | 5380 | nfds = thread_select (pselect, max_desc + 1, |
| 5376 | # ifdef HAVE_NS | ||
| 5377 | ns_select | ||
| 5378 | # else | ||
| 5379 | pselect | ||
| 5380 | # endif | ||
| 5381 | , max_desc + 1, | ||
| 5382 | &Available, | 5381 | &Available, |
| 5383 | (check_write ? &Writeok : 0), | 5382 | (check_write ? &Writeok : 0), |
| 5384 | NULL, &timeout, NULL); | 5383 | NULL, &timeout, NULL); |