summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Brinkmann <marcus@gnu.org>2002-09-10 18:58:47 +0000
committerMarcus Brinkmann <marcus@gnu.org>2002-09-10 18:58:47 +0000
commit1d5cf1783238fad25a6e55d5dcb324f6d8fb9918 (patch)
treec02fc06bb5c9dc855965d70504aa797af05ce19a
parentbe549330de1979ba914194bd79bfd7eb998a792e (diff)
2002-09-10 Marcus Brinkmann <marcus@gnu.org>
* hurdio.c (hurdio_writer_loop): Check output_stopped instead termflags. Move the code that signals the underlying file to ... (hurdio_start_output): ... here.
-rw-r--r--term/ChangeLog4
-rw-r--r--term/hurdio.c29
2 files changed, 17 insertions, 16 deletions
diff --git a/term/ChangeLog b/term/ChangeLog
index a5c8aef3..3ed79a77 100644
--- a/term/ChangeLog
+++ b/term/ChangeLog
@@ -1,5 +1,9 @@
2002-09-10 Marcus Brinkmann <marcus@gnu.org>
+ * hurdio.c (hurdio_writer_loop): Check output_stopped instead termflags.
+ Move the code that signals the underlying file to ...
+ (hurdio_start_output): ... here.
+
* munge.c (input_character): Really toggle USER_OUTPUT_SUSP if
VSTART == VSTOP.
diff --git a/term/hurdio.c b/term/hurdio.c
index 2dfbacef..ef34740b 100644
--- a/term/hurdio.c
+++ b/term/hurdio.c
@@ -243,26 +243,11 @@ hurdio_writer_loop (any_t arg)
{
while (writer_thread != MACH_PORT_NULL
&& (ioport == MACH_PORT_NULL || !qsize (outputq)
- || (termflags & USER_OUTPUT_SUSP)))
+ || output_stopped))
hurd_condition_wait (&hurdio_writer_condition, &global_lock);
if (writer_thread == MACH_PORT_NULL) /* A sign to die. */
return 0;
- /* If the output was suspended earlier, we have to tell the
- underlying port to resume it. */
- if (output_stopped)
- {
- if (tioc_caps & TIOC_CAP_START)
- {
- err = tioctl_tiocstart (ioport);
- if (err && (err == EMIG_BAD_ID || err == EOPNOTSUPP))
- tioc_caps &= ~TIOC_CAP_START;
- /* XXX Handle the error. */
- err = 0;
- }
- output_stopped = 0;
- }
-
/* Copy characters onto PENDING_OUTPUT, not bothering
those already there. */
size = qsize (outputq);
@@ -323,6 +308,18 @@ hurdio_writer_loop (any_t arg)
static error_t
hurdio_start_output ()
{
+ /* If the output was suspended earlier and not anymore, we have to
+ tell the underlying port to resume it. */
+ if (output_stopped && !(termflags & USER_OUTPUT_SUSP))
+ {
+ if (tioc_caps & TIOC_CAP_START)
+ {
+ error_t err = tioctl_tiocstart (ioport);
+ if (err && (err == EMIG_BAD_ID || err == EOPNOTSUPP))
+ tioc_caps &= ~TIOC_CAP_START;
+ }
+ output_stopped = 0;
+ }
condition_broadcast (&hurdio_writer_condition);
return 0;
}