svn commit: r209981 - head/sys/sys
Lawrence Stewart
lstewart at FreeBSD.org
Tue Jul 13 08:05:48 UTC 2010
Author: lstewart
Date: Tue Jul 13 08:05:48 2010
New Revision: 209981
URL: http://svn.freebsd.org/changeset/base/209981
Log:
Macro to simplify zeroing DPCPU variables.
Sponsored by: FreeBSD Foundation
MFC after: 3 days
Modified:
head/sys/sys/pcpu.h
Modified: head/sys/sys/pcpu.h
==============================================================================
--- head/sys/sys/pcpu.h Tue Jul 13 07:00:57 2010 (r209980)
+++ head/sys/sys/pcpu.h Tue Jul 13 08:05:48 2010 (r209981)
@@ -133,6 +133,15 @@ extern uintptr_t dpcpu_off[];
sum; \
})
+#define DPCPU_ZERO(n) do { \
+ u_int _i; \
+ \
+ CPU_FOREACH(_i) { \
+ bzero(DPCPU_ID_PTR(_i, n), \
+ sizeof(__typeof(DPCPU_PTR(n)))); \
+ } \
+} while(0)
+
/*
* XXXUPS remove as soon as we have per cpu variable
* linker sets and can define rm_queue in _rm_lock.h
More information about the svn-src-all
mailing list