[haiku-bugs] Re: [Haiku] #17344: Use the generic tty code in the tty driver

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Wed, 02 Mar 2022 23:22:19 -0000

#17344: Use the generic tty code in the tty driver
--------------------------+-------------------------
  Reporter:  pulkomandy   |      Owner:  nobody
      Type:  task         |     Status:  new
  Priority:  normal       |  Milestone:  Unscheduled
 Component:  Drivers/TTY  |    Version:  R1/beta3
Resolution:               |   Keywords:
Blocked By:               |   Blocking:
  Platform:  All          |
--------------------------+-------------------------
Comment (by pulkomandy):

 The locking was indeed different, but the new locking was not working
 properly, there were race conditions. This is what I changed, and now the
 "new" tty system uses the same locking design as the old one.

 As far as I can tell, the only difference now is that the old tty system
 has a preallocated hardcoded list of ttys. The new system can allocate
 them dynamically.

 I think the static list is needed for beos api compatibility. Our Terminal
 expects pty/tty devices to pre-exist in /dev.

 I think the old module could be stripped to do just that: provide these
 hardcoded pty/tty pairs in /dev. It could do so by using the new generic
 tty module. And maybe we can rename it to pty (pseudo-teletype) to make it
 more clear what it is used for: basically anything not related to an
 actual serial port.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/17344#comment:5>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: