summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authorkato <kato@FreeBSD.org>1997-09-01 10:42:43 +0000
committerkato <kato@FreeBSD.org>1997-09-01 10:42:43 +0000
commit37cdd6e9b91ebcba51590820bf976c177c1c378e (patch)
tree5ca8b1c3a782966bfc389fa6cc11572ad57645a6 /sys/pc98
parent245e6b264e78ca4abb4c3079fed13c5311ebacc4 (diff)
downloadFreeBSD-src-37cdd6e9b91ebcba51590820bf976c177c1c378e.zip
FreeBSD-src-37cdd6e9b91ebcba51590820bf976c177c1c378e.tar.gz
Synchronize with sys/i386/i386/microtime.s revision 1.31.
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/i386/microtime.s23
1 files changed, 21 insertions, 2 deletions
diff --git a/sys/pc98/i386/microtime.s b/sys/pc98/i386/microtime.s
index 211c747..4dac476 100644
--- a/sys/pc98/i386/microtime.s
+++ b/sys/pc98/i386/microtime.s
@@ -32,7 +32,7 @@
* SUCH DAMAGE.
*
* from: Steve McCanne's microtime code
- * $Id: microtime.s,v 1.13 1997/07/21 13:12:45 kato Exp $
+ * $Id: microtime.s,v 1.14 1997/08/24 11:09:36 kato Exp $
*/
#include "opt_cpu.h"
@@ -48,6 +48,10 @@
#endif
#include <i386/isa/timerreg.h>
+#ifdef SMP
+#include <machine/smptests.h> /** USE_CLOCKLOCK */
+#endif
+
ENTRY(microtime)
#if (defined(I586_CPU) || defined(I686_CPU)) && !defined(SMP)
@@ -62,7 +66,15 @@ ENTRY(microtime)
pushfl
cli /* disable interrupts */
-
+#ifdef USE_CLOCKLOCK
+ pushl %eax /* s_lock destroys %eax, %ecx */
+ pushl %ecx
+ pushl $_clock_lock
+ call _s_lock
+ addl $4, %esp
+ popl %ecx
+ popl %eax
+#endif /* USE_CLOCKLOCK */
outb %al, $TIMER_MODE /* latch timer 0's counter */
inb $TIMER_CNTR0, %al /* read counter value, LSB first */
movb %al, %cl
@@ -256,6 +268,13 @@ common_microtime:
addl _time+4, %eax /* usec += time.tv_sec */
movl _time, %edx /* sec = time.tv_sec */
+#ifdef USE_CLOCKLOCK
+ pushl %eax /* s_lock destroys %eax, %ecx */
+ pushl $_clock_lock
+ call _s_unlock
+ addl $4, %esp
+ popl %eax
+#endif /* USE_CLOCKLOCK */
popfl /* restore interrupt mask */
cmpl $1000000, %eax /* usec valid? */
OpenPOWER on IntegriCloud