/[hurd]/hurd/term/hurdio.c
ViewVC logotype

Diff of /hurd/term/hurdio.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by marcus, Tue Sep 10 17:26:18 2002 UTC revision 1.6 by marcus, Tue Sep 10 18:58:47 2002 UTC
# Line 243  hurdio_writer_loop (any_t arg) Line 243  hurdio_writer_loop (any_t arg)
243      {      {
244        while (writer_thread != MACH_PORT_NULL        while (writer_thread != MACH_PORT_NULL
245               && (ioport == MACH_PORT_NULL || !qsize (outputq)               && (ioport == MACH_PORT_NULL || !qsize (outputq)
246                   || (termflags & USER_OUTPUT_SUSP)))                   || output_stopped))
247          hurd_condition_wait (&hurdio_writer_condition, &global_lock);          hurd_condition_wait (&hurdio_writer_condition, &global_lock);
248        if (writer_thread == MACH_PORT_NULL) /* A sign to die.  */        if (writer_thread == MACH_PORT_NULL) /* A sign to die.  */
249          return 0;          return 0;
250    
       /* 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;  
         }  
   
251        /* Copy characters onto PENDING_OUTPUT, not bothering        /* Copy characters onto PENDING_OUTPUT, not bothering
252           those already there. */           those already there. */
253        size = qsize (outputq);        size = qsize (outputq);
# Line 323  hurdio_writer_loop (any_t arg) Line 308  hurdio_writer_loop (any_t arg)
308  static error_t  static error_t
309  hurdio_start_output ()  hurdio_start_output ()
310  {  {
311      /* If the output was suspended earlier and not anymore, we have to
312         tell the underlying port to resume it.  */
313      if (output_stopped && !(termflags & USER_OUTPUT_SUSP))
314        {
315          if (tioc_caps & TIOC_CAP_START)
316            {
317              error_t err = tioctl_tiocstart (ioport);
318              if (err && (err == EMIG_BAD_ID || err == EOPNOTSUPP))
319                tioc_caps &= ~TIOC_CAP_START;
320            }
321          output_stopped = 0;
322        }
323    condition_broadcast (&hurdio_writer_condition);    condition_broadcast (&hurdio_writer_condition);
324    return 0;    return 0;
325  }  }

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26