Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Always make sure that kte_entry is aligned appropri...



details:   https://anonhg.NetBSD.org/src/rev/7589d9e502c8
branches:  trunk
changeset: 769167:7589d9e502c8
user:      matt <matt%NetBSD.org@localhost>
date:      Thu Sep 01 18:24:19 2011 +0000

description:
Always make sure that kte_entry is aligned appropriately so register_t can
be stored there.  (not really a problem right now since time_t is now 64bit
bit and it just works but it's better to be explicit).

diffstat:

 sys/kern/kern_ktrace.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r a2199c69e4fd -r 7589d9e502c8 sys/kern/kern_ktrace.c
--- a/sys/kern/kern_ktrace.c    Thu Sep 01 18:20:20 2011 +0000
+++ b/sys/kern/kern_ktrace.c    Thu Sep 01 18:24:19 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_ktrace.c,v 1.157 2011/06/01 21:25:00 alnsn Exp $  */
+/*     $NetBSD: kern_ktrace.c,v 1.158 2011/09/01 18:24:19 matt Exp $   */
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.157 2011/06/01 21:25:00 alnsn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_ktrace.c,v 1.158 2011/09/01 18:24:19 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -97,7 +97,7 @@
        void    *kte_buf;
        size_t  kte_bufsz;      
 #define        KTE_SPACE               32
-       uint8_t kte_space[KTE_SPACE];
+       uint8_t kte_space[KTE_SPACE] __aligned(sizeof(register_t));
 };
 
 struct ktr_desc {



Home | Main Index | Thread Index | Old Index