aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/termios.h
Commit message (Collapse)AuthorAgeFilesLines
* Decompose <sys/termios.h>.Ed Schouten2009-11-281-301/+4
| | | | | | | | | | | | | | | | | | | | | | | The <sys/termios.h> header file is hardlinked to <termios.h>. It contains both the structures and the flag definitions, but also the C library interface that's implemented by the C library. This header file has the typical problem of including too many random things and being badly ordered. Instead of trying to fix this, decompose it into two header files: - <sys/_termios.h>, which contains struct termios and the flags. - <termios.h>, which includes <sys/_termios.h> and contains the C library interface. This means userspace has to include <termios.h> for struct termios, while kernelspace code has to include <sys/tty.h>. Also add a <sys/termios.h>, which prints a warning message before including <termios.h>. I am aware that there are some applications that use this header file as well. Notes: svn path=/head/; revision=199898
* Add tcsetsid(3).Ed Schouten2009-05-071-1/+2
| | | | | | | | | | | | | | The entire world seems to use the non-standard TIOCSCTTY ioctl to make a TTY a controlling terminal of a session. Even though tcsetsid(3) is also non-standard, I think it's a lot better to use in our own source code, mainly because it's similar to tcsetpgrp(), tcgetpgrp() and tcgetsid(). I stole the idea from QNX. They do it the other way around; their TIOCSCTTY is just a wrapper around tcsetsid(). tcsetsid() then calls into an IPC framework. Notes: svn path=/head/; revision=191882
* Use namespace visibility macros instead of checking for _POSIX_SOURCE.David Schultz2009-03-141-2/+2
| | | | Notes: svn path=/head/; revision=189813
* Make the new CCEQ macro a little more like the old one - first doDavid Malone2008-11-231-1/+1
| | | | | | | | | | | | the comparison between c and val and then compare val to _POSIX_VDISABLE. This avoids comparing c (which is usually of type char) to _POSIX_VDISABLE (which has value 0xff and may not be representable as a char). Reviewed by: ed Notes: svn path=/head/; revision=185233
* Small style(9) nit in <sys/termios.h>.Ed Schouten2008-09-061-71/+71
| | | | | | | | There are a lot of places where we do "#define<space>" instead of "#define<tab>". Clean this up a little. Notes: svn path=/head/; revision=182817
* Integrate the new MPSAFE TTY layer to the FreeBSD operating system.Ed Schouten2008-08-201-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The last half year I've been working on a replacement TTY layer for the FreeBSD kernel. The new TTY layer was designed to improve the following: - Improved driver model: The old TTY layer has a driver model that is not abstract enough to make it friendly to use. A good example is the output path, where the device drivers directly access the output buffers. This means that an in-kernel PPP implementation must always convert network buffers into TTY buffers. If a PPP implementation would be built on top of the new TTY layer (still needs a hooks layer, though), it would allow the PPP implementation to directly hand the data to the TTY driver. - Improved hotplugging: With the old TTY layer, it isn't entirely safe to destroy TTY's from the system. This implementation has a two-step destructing design, where the driver first abandons the TTY. After all threads have left the TTY, the TTY layer calls a routine in the driver, which can be used to free resources (unit numbers, etc). The pts(4) driver also implements this feature, which means posix_openpt() will now return PTY's that are created on the fly. - Improved performance: One of the major improvements is the per-TTY mutex, which is expected to improve scalability when compared to the old Giant locking. Another change is the unbuffered copying to userspace, which is both used on TTY device nodes and PTY masters. Upgrading should be quite straightforward. Unlike previous versions, existing kernel configuration files do not need to be changed, except when they reference device drivers that are listed in UPDATING. Obtained from: //depot/projects/mpsafetty/... Approved by: philip (ex-mentor) Discussed: on the lists, at BSDCan, at the DevSummit Sponsored by: Snow B.V., the Netherlands dcons(4) fixed by: kan Notes: svn path=/head/; revision=181905
* Move the TCSA* definitions out of _KERNEL. They are processed in libc.Ed Schouten2008-07-161-10/+10
| | | | | | | | | | | The tcsetattr() routine already converts the TCSA* arguments to their respective TIOCSETA* ioctl's in the C library. There is no need to have these definitions inside the kernel. Approved by: philip (mentor, implicit) Notes: svn path=/head/; revision=180561
* Add missing function prototype for tcgetsid().David Xu2008-04-181-0/+10
| | | | Notes: svn path=/head/; revision=178295
* /* -> /*- for license, minor formatting changesWarner Losh2005-01-071-1/+1
| | | | Notes: svn path=/head/; revision=139825
* Remove advertising clause from University of California Regent's license,Warner Losh2004-04-071-4/+0
| | | | | | | | | per letter dated July 22, 1999. Approved by: core Notes: svn path=/head/; revision=127976
* Remove __PAlfred Perlstein2002-03-191-12/+12
| | | | Notes: svn path=/head/; revision=92719
* Add B921600 (yes, some serial ports can do this, but generic sio not supportAndrey A. Chernov2001-06-201-0/+1
| | | | | | | them yet) Notes: svn path=/head/; revision=78485
* Add B460800 defineAndrey A. Chernov2001-05-291-0/+1
| | | | Notes: svn path=/head/; revision=77400
* implement OCRNL, ONOCR, and ONLRETAssar Westerlund2001-03-041-0/+3
| | | | | | | Obtained from: NetBSD Notes: svn path=/head/; revision=73421
* Kernel support for erase2 character.Jordan K. Hubbard2000-11-281-1/+2
| | | | | | | Submitted by: Rui Pedro Mendes Salgueiro <rps@mat.uc.pt> Notes: svn path=/head/; revision=69322
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"Peter Wemm1999-12-291-2/+2
| | | | | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come. Notes: svn path=/head/; revision=55205
* $Id$ -> $FreeBSD$Peter Wemm1999-08-281-1/+1
| | | | Notes: svn path=/head/; revision=50477
* Change a couple of long types to int to match NetBSD so that termiosJohn Birrell1998-05-051-3/+3
| | | | | | | works on alpha without any modifications. Notes: svn path=/head/; revision=35755
* Changed speed_t from long to unsigned long. POSIX.1 requires anBruce Evans1998-03-121-2/+2
| | | | | | | | | | | | unsigned integral type. Changing it doesn't seem to cause any sign extension bugs in /usr/src. In the kernel, this is partly because `struct speedtab' and its lookup function are too bogus to use speed_t's for speeds - they use ints. Reminded by: PR 5786 Notes: svn path=/head/; revision=34522
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notPeter Wemm1997-02-221-1/+1
| | | | | | | ready for it yet. Notes: svn path=/head/; revision=22975
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* Fixed handling of non-POSIX control characters. They must not doBruce Evans1996-11-291-6/+6
| | | | | | | | | anything special unless IEXTEN is set. Found by: NIST-PCTS Notes: svn path=/head/; revision=20020
* Remove trailing whitespace.Rodney W. Grimes1995-05-301-7/+7
| | | | Notes: svn path=/head/; revision=8876
* Define _POSIX_VDISABLE so that it can be used in #if expressions.Bruce Evans1995-05-111-3/+3
| | | | Notes: svn path=/head/; revision=8449
* Define CDTR_IFLOW and CDSR_OFLOW which are now required for compilingBruce Evans1995-04-301-5/+7
| | | | | | | | | | | bin/stty. Define alias CCAR_OFLOW for MDMBUF. Declare speeds as having type speed_t instead of long. speed_t is long, which is wrong (POSIX specifies it to be unsigned integral), but fixing it might introduce more serious bugs. Notes: svn path=/head/; revision=8187
* Added $Id$David Greenman1994-08-021-0/+1
| | | | Notes: svn path=/head/; revision=1817
* The big 4.4BSD Lite to FreeBSD 2.0.0 (Development) patch.Rodney W. Grimes1994-05-251-1/+2
| | | | | | | | Reviewed by: Rodney W. Grimes Submitted by: John Dyson and David Greenman Notes: svn path=/head/; revision=1549
* BSD 4.4 Lite Kernel SourcesRodney W. Grimes1994-05-241-0/+278
Notes: svn path=/head/; revision=1541