libove@libove.UUCP (Jay Mathew Libove) (02/17/88)
I have been using Micro Emacs 3.9e on SCO Xenix (2.2.1, dev 2.1.4d) for some months now, and I have found that when more than one uEmacs is running, the machine is sluggish to respond to keyboard input. I recall seeing some stuff go by about a modification to uEmacs 3.9 that rids it of this CPU hogging behavior. Can someone please send me the information? Thanks -Jay Libove (Jay.Libove@andrew.cmu.edu, pitt!darth!libove!libove) -- -Jay Libove {pitt|bellcore}!darth!libove!libove *or* Jay.Libove@andrew.cmu.edu
backstro@silver.bacs.indiana.edu (Dave White) (02/18/88)
In article <7@libove.UUCP> libove@libove.UUCP (Jay Mathew Libove) writes: >I recall seeing some stuff go by about a modification to uEmacs 3.9 >that rids it of this CPU hogging behavior. Can someone please send me >the information? > >-Jay Libove {pitt|bellcore}!darth!libove!libove *or* Jay.Libove@andrew.cmu.edu I would like this as well. Many thanks in advance.
karl@sugar.UUCP (Karl Lehenbauer) (02/28/88)
In article <7@libove.UUCP> libove@libove.UUCP (Jay Mathew Libove) writes: >I recall seeing some stuff go by about a modification to uEmacs 3.9 >that rids it of this CPU hogging behavior. Can someone please send me >the information? In article <929@silver.bacs.indiana.edu>, backstro@silver.bacs.indiana.edu (Dave White) writes: > I would like this as well. Many thanks in advance. In article <1107@sugar.UUCP>, I wrote about an apparent problem with uEMACS under Unix System V. I dug around and found that they do an fcntl to set read with no delay as a means of getting typeahead in order to figure out to cancel output in progress. Anyway, there's a variable, kbdpoll, which is set to TRUE to indicate that the input has been set to no delay, O_NDELAY, via fcntl. When 'typahead' is called, if kbdpoll isn't set, typahead sets it and calls fcntl with O_NDELAY so it can do the read without wait. When 'ttgetc' is called to get a character in the regular manner, if kbdpoll is set, ttgetc does an fcntl to turn off O_NDELAY and clears kbdpoll. The problem is that typahead doesn't set kbdpoll after setting O_NDELAY, so ttgetc never knows to clear it, resulting in a no-delay loop doing "while (read(0, &kbdq, 1) != 1);" Here's the diff: 490a491 > kbdpoll = TRUE; -- "I just thought of something funny...your mother." - Cheech Marin ..!uunet!nuchat!sugar!karl, Unix BBS (713) 438-5018