summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-12-11 23:43:21 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-12-11 23:43:21 +0000
commitd7031edcfa7b7567288f23c1feeeb26f141931d5 (patch)
tree78b3eba0385e4a9baf227cb4838cae659c545ff7 /src
parent9eb8959aaad86b30ab55f74a8d2a2651c41ee7a3 (diff)
downloademacs-d7031edcfa7b7567288f23c1feeeb26f141931d5.tar.gz
(handle_async_input): Remove pthread mutex handling.
(input_available_signal): Move pthread thingy to !SYNC_INPUT branch.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c52
1 files changed, 18 insertions, 34 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index 19973edf33d..4203619863b 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -6780,24 +6780,6 @@ handle_async_input ()
#ifdef BSD4_1
extern int select_alarmed;
#endif
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
- extern pthread_t main_thread;
- if (pthread_self () != main_thread)
- {
- /* POSIX says any thread can receive the signal. On GNU/Linux that is
- not true, but for other systems (FreeBSD at least) it is. So direct
- the signal to the correct thread and block it from this thread. */
-#ifdef SIGIO
- sigset_t new_mask;
-
- sigemptyset (&new_mask);
- sigaddset (&new_mask, SIGIO);
- pthread_sigmask (SIG_BLOCK, &new_mask, 0);
- pthread_kill (main_thread, SIGIO);
-#endif
- return;
- }
-#endif
interrupt_input_pending = 0;
@@ -6826,22 +6808,6 @@ input_available_signal (signo)
{
/* Must preserve main program's value of errno. */
int old_errno = errno;
-#if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
- extern pthread_t main_thread;
- if (pthread_self () != main_thread)
- {
- /* POSIX says any thread can receive the signal. On GNU/Linux that is
- not true, but for other systems (FreeBSD at least) it is. So direct
- the signal to the correct thread and block it from this thread. */
- sigset_t new_mask;
-
- sigemptyset (&new_mask);
- sigaddset (&new_mask, SIGIO);
- pthread_sigmask (SIG_BLOCK, &new_mask, 0);
- pthread_kill (main_thread, SIGIO);
- return;
- }
-#endif /* HAVE_GTK_AND_PTHREAD */
#if defined (USG) && !defined (POSIX_SIGNALS)
/* USG systems forget handlers when they are used;
must reestablish each time */
@@ -6858,6 +6824,24 @@ input_available_signal (signo)
#ifdef SYNC_INPUT
interrupt_input_pending = 1;
#else
+
+# if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD)
+ extern pthread_t main_thread;
+ if (pthread_self () != main_thread)
+ {
+ /* POSIX says any thread can receive the signal. On GNU/Linux that is
+ not true, but for other systems (FreeBSD at least) it is. So direct
+ the signal to the correct thread and block it from this thread. */
+ sigset_t new_mask;
+
+ sigemptyset (&new_mask);
+ sigaddset (&new_mask, SIGIO);
+ pthread_sigmask (SIG_BLOCK, &new_mask, 0);
+ pthread_kill (main_thread, SIGIO);
+ return;
+ }
+# endif /* HAVE_GTK_AND_PTHREAD */
+
handle_async_input ();
#endif