Macro to simplify zeroing DPCPU variables.

Sponsored by:	FreeBSD Foundation
MFC after:	3 days
This commit is contained in:
Lawrence Stewart 2010-07-13 08:05:48 +00:00
parent 985147dec6
commit aac762c267

View File

@ -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