diff options
author | bde <bde@FreeBSD.org> | 1997-03-22 06:53:45 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 1997-03-22 06:53:45 +0000 |
commit | 0bc178170104cff1e818e849d08a50c6a4ee0851 (patch) | |
tree | 1a4787be89dc6587f785bb211bf92dd0ce277648 /sys/kern/tty.c | |
parent | 5610d80b6231f85421e587a175ddd4d4b0c735c5 (diff) | |
download | FreeBSD-src-0bc178170104cff1e818e849d08a50c6a4ee0851.zip FreeBSD-src-0bc178170104cff1e818e849d08a50c6a4ee0851.tar.gz |
Fixed some invalid (non-atomic) accesses to `time', mostly ones of the
form `tv = time'. Use a new function gettime(). The current version
just forces atomicicity without fixing precision or efficiency bugs.
Simplified some related valid accesses by using the central function.
Diffstat (limited to 'sys/kern/tty.c')
-rw-r--r-- | sys/kern/tty.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 8d91223..a1e516d 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -36,7 +36,7 @@ * SUCH DAMAGE. * * @(#)tty.c 8.8 (Berkeley) 1/21/94 - * $Id$ + * $Id: tty.c,v 1.91 1997/02/22 09:39:23 peter Exp $ */ /*- @@ -1513,9 +1513,7 @@ loop: goto sleep; if (qp->c_cc >= m) goto read; - x = splclock(); - timecopy = time; - splx(x); + gettime(&timecopy); if (!has_stime) { /* first character, start timer */ has_stime = 1; @@ -1535,9 +1533,7 @@ loop: } else { /* m == 0 */ if (qp->c_cc > 0) goto read; - x = splclock(); - timecopy = time; - splx(x); + gettime(&timecopy); if (!has_stime) { has_stime = 1; stime = timecopy; |