[haiku-bugs] Re: [Haiku] #14738: [pc_serial] Sometimes gets stuck in Write() (even in async mode)

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Mon, 03 Dec 2018 14:20:32 -0000

#14738: [pc_serial] Sometimes gets stuck in Write() (even in async mode)
---------------------------+----------------------------
   Reporter:  ttcoder      |      Owner:  mmu_man
       Type:  bug          |     Status:  assigned
   Priority:  normal       |  Milestone:  Unscheduled
  Component:  Drivers/TTY  |    Version:  R1/Development
 Resolution:               |   Keywords:
 Blocked By:               |   Blocking:
Has a Patch:  0            |   Platform:  All
---------------------------+----------------------------

Comment (by ttcoder):

 Replying to [comment:2 pulkomandy]:

I suspect a race condition, where we manage to call write twice, quickly
 enough, and the interrupt triggers only once, resulting in the second
 write call blocking for no reason.


 Very interesting.. If that is indeed the cause, I guess it would be
 mitigated by doing a snooze(9000) (or whatever the delay is between
 interrupts) after each write? Remember, a perfect fix later does not have
 to exclude an immediate work-around -- the station would be happy if I
 could provide a timely improvement :-)

-- 
Ticket URL: <https://dev.haiku-os.org/ticket/14738#comment:3>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: