cpuset: revert and annotate instead

This commit is contained in:
mmacy 2018-05-19 05:07:31 +00:00
parent 861014e26c
commit 5eda5d6711

View File

@ -1386,9 +1386,7 @@ cpuset_thread0(void)
{
struct cpuset *set;
int i;
#ifdef INVARIANTS
int error;
#endif
int error __unused;
cpuset_zone = uma_zcreate("cpuset", sizeof(struct cpuset), NULL, NULL,
NULL, NULL, UMA_ALIGN_CACHE, 0);
@ -1413,14 +1411,14 @@ cpuset_thread0(void)
* Now derive a default (1), modifiable set from that to give out.
*/
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 1));
error = _cpuset_create(set, cpuset_zero, NULL, NULL, 1);
KASSERT(error == 0, ("Error creating default set: %d\n", error));
cpuset_default = set;
/*
* Create the kernel set (2).
*/
set = uma_zalloc(cpuset_zone, M_WAITOK | M_ZERO);
DBGSET(error, _cpuset_create(set, cpuset_zero, NULL, NULL, 2));
error = _cpuset_create(set, cpuset_zero, NULL, NULL, 2);
KASSERT(error == 0, ("Error creating kernel set: %d\n", error));
set->cs_domain = &domainset2;
cpuset_kernel = set;