Return to BSD News archive
Newsgroups: comp.os.386bsd.development Path: sserve!newshost.anu.edu.au!munnari.oz.au!constellation!osuunx.ucc.okstate.edu!moe.ksu.ksu.edu!crcnis1.unl.edu!wupost!howland.reston.ans.net!gatech!destroyer!cs.ubc.ca!unixg.ubc.ca!acs.ucalgary.ca!cpsc.ucalgary.ca!xenlink!fsa.ca!deraadt From: deraadt@fsa.ca (Theo de Raadt) Subject: Re: 16 bit implications (Re: 7bit unclean considered harmfull (was: Re: Need your opinion (TTYDEF ))8-bit clean state)) In-Reply-To: cgd@crucifixion.CS.Berkeley.EDU's message of 18 Jun 93 01: 19:58 Message-ID: <DERAADT.93Jun18201134@newt.fsa.ca> Sender: news@fsa.ca Nntp-Posting-Host: newt.fsa.ca Organization: little lizard city References: <1993Jun14.081754.18248@alf.uib.no> <1vi6ak$hs7@umd5.umd.edu> <CGD.93Jun17215526@crucifixion.CS.Berkeley.EDU> <1993Jun18.072919.23475@gmd.de> <CGD.93Jun18011958@crucifixion.CS.Berkeley.EDU> Date: Sat, 19 Jun 1993 03:11:34 GMT Lines: 40 In article <CGD.93Jun18011958@crucifixion.CS.Berkeley.EDU> cgd@crucifixion.CS.Berkeley.EDU (Chris G. Demetriou) writes: > In article <1993Jun18.072919.23475@gmd.de> veit@mururoa.gmd.de (Holger Veit) writes: > >There is no such 16bit clean code in the entire kernel, > >so a plugin-and-play solution cannot be expected. > NetBSD's ring-buffer code will be N-bit clean, as long > as you typedef "rbchar"s as a data type with >= 2N bits. > right now, our rbchars are a short, so our ringbuffer > code is 8-bit clean. (386bsd's, as of the latest patchkit, > uses chars as their ring buffer entries. they're 8-bit clean, > but e.g. the quote flags is thrown away, and ^v^d<return> > does interesting things.) I agree with Chris here (modulus more bugs). Also, I think that if you mix termios/sgttyb calls, you will find that things get messy. But, in general, you could "typedef long long rbchar" and have 32 bit characters in the kernel. The 2N thing is correct (oh, and of course, you must change the TTYQUOTE definition). > *i* have a great distaste for putting the character flags > in a seperate ring buffer, etc. it just complicates everything, > and unless it's done with another ring buffer (i.e. with > another instance of the already-existing ring-buffer data types), > it adds an unnecessary set of functions to the kernel... > in any case, it requires double the work in all places > where characters are used. I too, have a great distaste for that idea. All of the ring buffer functions will need to be modified to play with two ring buffers simultaneously. It easier to double the size of the rbchar type. Holger -- it does not sound like you've looked at the NetBSD tty subsystem changes. I suggest you do -- they really are good portable changes. Looking at this code soon will avoid the console mailing list people following the "Not Invented Here" syndrome that makes linux what it is. (oh oh, i just set myself up to be flamed) -- This space not left unintentionally unblank. deraadt@fsa.ca