Commit Graph

40 Commits

Author SHA1 Message Date
christos 92a9826daf - Introduce a sysctl to control the default tty queue size kern.tty.qsize,
which defaults to 1024 as before.
- Add two ioctls TIOC{G,S}QSIZE to read and adjust the queue size on
  individual ptys.

NB: ttys (and ptys) still silently (or beepingly (IMAXBEL)) drop
    characters if the queue size is exceeded. I.e. you can appear
    to succeed writing to the {p,t}ty, but not all characters will
    have made it if the queue overflows.  CVS:
2011-09-24 00:05:38 +00:00
dsl e6a11930a4 Christos was worried about clrbits() being called with a length of zero.
This can't happen, but rework so it doesn't matter.
Remove 'optimisation' for length 1, that doesn't happen often enough.
2009-11-14 13:18:41 +00:00
dsl f3583ee6ce Fix clrbits() so that it doesn't mask no bits out of the byte after the
range (when the last bit to be cleared is the msb of a byte).
Fixes PR/42312 in a slightly better way than proposed.
2009-11-13 19:15:24 +00:00
dsl be258d919e Change args to clrbits() to be unsigned for efficiency. 2009-11-13 19:00:15 +00:00
uebayasi 7c002f258b KNF. ANSI'fy. 2009-03-09 16:19:22 +00:00
yamt cb1e92d5d5 malloc -> kmem_alloc 2009-01-22 14:38:34 +00:00
drochner 8b720093a8 wipe out tty buffer contents after read, to avoid keeping possibly
sensitive information in memory longer than necessary
(We could make this depend on ~ECHO or so, but this would be an API
change and I don't think it is worth the effort.)
2008-07-16 18:27:49 +00:00
ad 5e4b324300 Properly fix the "hanging in tty" bug that was worked around with cv_wakeup()
some time again.
2008-05-25 19:22:21 +00:00
ad 4caeb79017 Restore seperate condvars for clist i/o and clist control activity.
Fixes lockups with concurrent output to ttys. kern/37455
2007-12-22 02:21:29 +00:00
ad dc26833bb6 - Factor out too many copies of the same bit of tty code.
- Fix another tty signalling/wakeup problem.
2007-11-19 18:51:36 +00:00
ad d37935697b Merge tty changes from the vmlocking branch. 2007-11-07 15:56:11 +00:00
thorpej 7c4d54df55 Use ANSI function decls, sprinkle static. 2005-12-08 03:09:04 +00:00
perry da8abec863 nuke trailing whitespace 2005-02-26 21:34:55 +00:00
junyoung a222c81884 Nuke __P(). 2004-03-23 13:22:03 +00:00
wiz d20841bb64 Uppercase CPU, plural is CPUs. 2004-02-13 11:36:08 +00:00
agc 7db1d33cba Modify the licences of code written by Theo De Raadt from a 4-clause
to a 2-clause licence (retaining UCB clauses (1) and (2)), per PR
22409 from Joel Baker, approved by Theo de Raadt, and ratified by
myself - the only discrepancy being the handling of the original
clause 3 in src/usr.sbin/yppoll/yppoll.c.
2003-12-10 12:06:25 +00:00
thorpej b193480908 Add extensible malloc types, adapted from FreeBSD. This turns
malloc types into a structure, a pointer to which is passed around,
instead of an int constant.  Allow the limit to be adjusted when the
malloc type is defined, or with a function call, as suggested by
Jonathan Stone.
2003-02-01 06:23:35 +00:00
msaitoh f0f871744a remove cinit()
This functions is completely null, not called from anywhere and
defined since rev. 1.1 (July 1993).
2003-01-08 12:00:25 +00:00
ad 281fb6d209 In clalloc(), clear the quoted char bitmap (part of the ring buffer was
being cleared twice).
2001-12-27 02:27:50 +00:00
lukem adc783d537 add RCSIDs 2001-11-12 15:25:01 +00:00
thorpej 831865b30e MALLOC()/FREE() are not to be used for variable sized allocations. 2000-08-02 20:53:07 +00:00
augustss 264f1d27c6 Get rid of register declarations. 2000-03-30 09:27:11 +00:00
simonb 5d8b1ef3e4 g/c REAL_CLISTS. 1999-04-25 02:56:26 +00:00
perry 275d1554aa Abolition of bcopy, ovbcopy, bcmp, and bzero, phase one.
bcopy(x, y, z) ->  memcpy(y, x, z)
ovbcopy(x, y, z) -> memmove(y, x, z)
   bcmp(x, y, z) ->  memcmp(x, y, z)
  bzero(x, y)    ->  memset(x, 0, y)
1998-08-04 04:03:10 +00:00
cgd ef6504281a remove duplicate prototypes from tty_subr.c (ndqb, putc, b_to_q), and
make the first arg of b_to_q (the u_char * that points to data to be
stuffed into the queue) const, since it's not modified.
1996-10-25 21:20:29 +00:00
christos f443b89c92 backout previous kprintf change 1996-10-13 02:32:29 +00:00
christos 60d201973e printf -> kprintf, sprintf -> ksprintf 1996-10-10 22:46:11 +00:00
christos 09afd77655 More proto fixes 1996-02-09 18:59:18 +00:00
christos 8a5b1b92e2 First pass at prototyping 1996-02-04 02:15:01 +00:00
cgd 6ac2bbfc35 be more careful with types, also pull in headers where necessary. 1994-10-30 21:43:03 +00:00
cgd 7545c52d98 fix ndqb bug handling flags other than TTY_QUOTE. 1994-10-02 04:11:53 +00:00
deraadt d8a9dcab90 ndqb() was broken for full ring buffers! fix from paulus. 1994-07-18 03:38:31 +00:00
cgd cf92afd66e New RCS ID's, take two. they're more aesthecially pleasant, and use 'NetBSD' 1994-06-29 06:29:24 +00:00
deraadt 7f3946f0ec use u_char's instead of char's; else the TTY_QUOTE bit can get accidentally
be set. Also fix copyright.
1994-05-25 10:00:26 +00:00
cgd a0a7429482 lots of changes: prototype migration, move lots of variables, definitions,
and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
1994-05-05 05:35:42 +00:00
deraadt a247ecab97 whoops, typo 1994-02-24 01:37:18 +00:00
deraadt f70a340fd9 cleanup a printf 1994-01-07 18:03:56 +00:00
mycroft 7f50bd1829 Canonicalize all #includes. 1993-12-18 04:21:37 +00:00
deraadt c52686ddb3 from magnum branch: nbqd() was broken 1993-10-13 03:15:57 +00:00
mycroft 41b03a4a6e Change tty code to use clist interface, but with ring buffer implementation.
Also, fix a couple of bugs in tty.c and pccons.c, and some gross kluginess
in the hp300 stuff.
1993-07-12 11:33:54 +00:00