diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2003-05-13 20:32:00 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2003-05-13 20:32:00 +0000 |
commit | 111ed7f19d9ead1b67e309ddc15225e41924d016 (patch) | |
tree | e9e6ef3692fe80677004d4712fdf2489cc3ff361 /sys/kern/kern_clock.c | |
parent | 8129993d1fd31bc467b8cde015cbdad7a33fb1a1 (diff) |
Force "struct timeval time" variable to be aligned to an 8-bit boundary.
This is at least necessary for the sparc microtime() function, and was
only working before by goat luck. The recent commons removal triggered it.
__atribute__ syntax borrowed from NetBSD.
Diffstat (limited to 'sys/kern/kern_clock.c')
-rw-r--r-- | sys/kern/kern_clock.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/kern_clock.c b/sys/kern/kern_clock.c index 05eaad94e34..2e7c6dc1f39 100644 --- a/sys/kern/kern_clock.c +++ b/sys/kern/kern_clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_clock.c,v 1.40 2002/09/24 00:06:23 nordin Exp $ */ +/* $OpenBSD: kern_clock.c,v 1.41 2003/05/13 20:31:59 miod Exp $ */ /* $NetBSD: kern_clock.c,v 1.34 1996/06/09 04:51:03 briggs Exp $ */ /*- @@ -110,7 +110,8 @@ static int tickfixcnt; /* accumulated fractional error */ long cp_time[CPUSTATES]; -volatile struct timeval time; +volatile struct timeval time + __attribute__((__aligned__(__alignof__(quad_t)))); volatile struct timeval mono_time; #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS |