Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern Guard a function local CTASSERT with prologue/epilogue
details: https://anonhg.NetBSD.org/src/rev/a7b928a89272
branches: trunk
changeset: 789999:a7b928a89272
user: martin <martin%NetBSD.org@localhost>
date: Sat Sep 14 20:49:31 2013 +0000
description:
Guard a function local CTASSERT with prologue/epilogue
diffstat:
sys/kern/kern_synch.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 9bcd8a766b3a -r a7b928a89272 sys/kern/kern_synch.c
--- a/sys/kern/kern_synch.c Sat Sep 14 20:47:48 2013 +0000
+++ b/sys/kern/kern_synch.c Sat Sep 14 20:49:31 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_synch.c,v 1.305 2012/09/02 16:00:00 mlelstv Exp $ */
+/* $NetBSD: kern_synch.c,v 1.306 2013/09/14 20:49:31 martin Exp $ */
/*-
* Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008, 2009
@@ -69,7 +69,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.305 2012/09/02 16:00:00 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.306 2013/09/14 20:49:31 martin Exp $");
#include "opt_kstack.h"
#include "opt_perfctrs.h"
@@ -1223,7 +1223,9 @@
/* Load average calculation. */
if (__predict_false(lavg_count == 0)) {
int i;
+ __CT_LOCAL_PROLOGUE
CTASSERT(__arraycount(cexp) == __arraycount(avg->ldavg));
+ __CT_LOCAL_EPILOGUE
for (i = 0; i < __arraycount(cexp); i++) {
avg->ldavg[i] = (cexp[i] * avg->ldavg[i] +
nrun * FSCALE * (FSCALE - cexp[i])) >> FSHIFT;
Home |
Main Index |
Thread Index |
Old Index