Macro to simplify zeroing DPCPU variables.
Sponsored by: FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
985147dec6
commit
aac762c267
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user