Index: head/share/man/man9/Makefile =================================================================== --- head/share/man/man9/Makefile +++ head/share/man/man9/Makefile @@ -607,7 +607,7 @@ bitset.9 BIT_CMP.9 \ bitset.9 BIT_OR.9 \ bitset.9 BIT_AND.9 \ - bitset.9 BIT_NAND.9 \ + bitset.9 BIT_ANDNOT.9 \ bitset.9 BIT_CLR_ATOMIC.9 \ bitset.9 BIT_SET_ATOMIC.9 \ bitset.9 BIT_SET_ATOMIC_ACQ.9 \ @@ -856,7 +856,7 @@ cpuset.9 CPU_CMP.9 \ cpuset.9 CPU_OR.9 \ cpuset.9 CPU_AND.9 \ - cpuset.9 CPU_NAND.9 \ + cpuset.9 CPU_ANDNOT.9 \ cpuset.9 CPU_CLR_ATOMIC.9 \ cpuset.9 CPU_SET_ATOMIC.9 \ cpuset.9 CPU_SET_ATOMIC_ACQ.9 \ Index: head/share/man/man9/bitset.9 =================================================================== --- head/share/man/man9/bitset.9 +++ head/share/man/man9/bitset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 7, 2017 +.Dd December 12, 2019 .Dt BITSET 9 .Os .Sh NAME @@ -52,8 +52,8 @@ .Nm BIT_OR2 , .Nm BIT_AND , .Nm BIT_AND2 , -.Nm BIT_NAND , -.Nm BIT_NAND2 , +.Nm BIT_ANDNOT , +.Nm BIT_ANDNOT2 , .Nm BIT_XOR , .Nm BIT_XOR2 , .Nm BIT_CLR_ATOMIC , @@ -116,8 +116,8 @@ .Fa "struct STRUCTNAME *src1" .Fa "struct STRUCTNAME *src2" .Fc -.Fn BIT_NAND "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" -.Fo BIT_NAND2 +.Fn BIT_ANDNOT "const SETSIZE" "struct STRUCTNAME *dst" "struct STRUCTNAME *src" +.Fo BIT_ANDNOT2 .Fa "const SETSIZE" .Fa "struct STRUCTNAME *dst" .Fa "struct STRUCTNAME *src1" @@ -412,7 +412,7 @@ .Fa src2 . ) .Pp The -.Fn BIT_NAND +.Fn BIT_ANDNOT macro clears bits set in .Fa src from @@ -425,7 +425,7 @@ .Fa ~ src . ) .Pp The -.Fn BIT_NAND2 +.Fn BIT_ANDNOT2 macro computes .Fa src1 bitwise and not Index: head/share/man/man9/cpuset.9 =================================================================== --- head/share/man/man9/cpuset.9 +++ head/share/man/man9/cpuset.9 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 29, 2016 +.Dd December 12, 2019 .Dt CPUSET 9 .Os .Sh NAME @@ -48,7 +48,7 @@ .Nm CPU_CMP , .Nm CPU_OR , .Nm CPU_AND , -.Nm CPU_NAND , +.Nm CPU_ANDNOT , .Nm CPU_CLR_ATOMIC , .Nm CPU_SET_ATOMIC , .Nm CPU_SET_ATOMIC_ACQ , @@ -88,7 +88,7 @@ .Fn CPU_CMP "cpuset_t *cpuset1" "cpuset_t *cpuset2" .Fn CPU_OR "cpuset_t *dst" "cpuset_t *src" .Fn CPU_AND "cpuset_t *dst" "cpuset_t *src" -.Fn CPU_NAND "cpuset_t *dst" "cpuset_t *src" +.Fn CPU_ANDNOT "cpuset_t *dst" "cpuset_t *src" .\" .Fn CPU_CLR_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset" .Fn CPU_SET_ATOMIC "size_t cpu_idx" "cpuset_t *cpuset" @@ -303,7 +303,7 @@ .Fn CPU_OR_ATOMIC . .Pp The -.Fn CPU_NAND +.Fn CPU_ANDNOT macro removes CPUs in .Fa src from Index: head/sys/i386/i386/vm_machdep.c =================================================================== --- head/sys/i386/i386/vm_machdep.c +++ head/sys/i386/i386/vm_machdep.c @@ -598,7 +598,7 @@ if ((flags & SFB_CPUPRIVATE) == 0) { other_cpus = all_cpus; CPU_CLR(cpuid, &other_cpus); - CPU_NAND(&other_cpus, &sf->cpumask); + CPU_ANDNOT(&other_cpus, &sf->cpumask); if (!CPU_EMPTY(&other_cpus)) { CPU_OR(&sf->cpumask, &other_cpus); smp_masked_invlpg(other_cpus, sf->kva, kernel_pmap); Index: head/sys/kern/kern_cpuset.c =================================================================== --- head/sys/kern/kern_cpuset.c +++ head/sys/kern/kern_cpuset.c @@ -510,7 +510,7 @@ return (true); /* Remove empty domains from the set and recompute. */ - DOMAINSET_NAND(&domain->ds_mask, &empty); + DOMAINSET_ANDNOT(&domain->ds_mask, &empty); domain->ds_cnt = DOMAINSET_COUNT(&domain->ds_mask); for (i = j = 0; i < DOMAINSET_FLS(&domain->ds_mask); i++) if (DOMAINSET_ISSET(i, &domain->ds_mask)) Index: head/sys/kern/kern_rmlock.c =================================================================== --- head/sys/kern/kern_rmlock.c +++ head/sys/kern/kern_rmlock.c @@ -542,7 +542,7 @@ if (CPU_CMP(&rm->rm_writecpus, &all_cpus)) { /* Get all read tokens back */ readcpus = all_cpus; - CPU_NAND(&readcpus, &rm->rm_writecpus); + CPU_ANDNOT(&readcpus, &rm->rm_writecpus); rm->rm_writecpus = all_cpus; /* Index: head/sys/kern/sched_4bsd.c =================================================================== --- head/sys/kern/sched_4bsd.c +++ head/sys/kern/sched_4bsd.c @@ -1181,7 +1181,7 @@ if (forward_wakeup_use_mask) { map = idle_cpus_mask; - CPU_NAND(&map, &dontuse); + CPU_ANDNOT(&map, &dontuse); /* If they are both on, compare and use loop if different. */ if (forward_wakeup_use_loop) { @@ -1366,7 +1366,7 @@ } else { if (!single_cpu) { tidlemsk = idle_cpus_mask; - CPU_NAND(&tidlemsk, &hlt_cpus_mask); + CPU_ANDNOT(&tidlemsk, &hlt_cpus_mask); CPU_CLR(cpuid, &tidlemsk); if (!CPU_ISSET(cpuid, &idle_cpus_mask) && Index: head/sys/kern/sched_ule.c =================================================================== --- head/sys/kern/sched_ule.c +++ head/sys/kern/sched_ule.c @@ -705,7 +705,7 @@ if (match & CPU_SEARCH_HIGHEST) hgroup.cs_cpu = -1; if (child) { /* Handle child CPU group. */ - CPU_NAND(&cpumask, &child->cg_mask); + CPU_ANDNOT(&cpumask, &child->cg_mask); switch (match) { case CPU_SEARCH_LOWEST: load = cpu_search_lowest(child, &lgroup); Index: head/sys/kern/subr_kdb.c =================================================================== --- head/sys/kern/subr_kdb.c +++ head/sys/kern/subr_kdb.c @@ -666,7 +666,7 @@ if (!SCHEDULER_STOPPED()) { #ifdef SMP other_cpus = all_cpus; - CPU_NAND(&other_cpus, &stopped_cpus); + CPU_ANDNOT(&other_cpus, &stopped_cpus); CPU_CLR(PCPU_GET(cpuid), &other_cpus); stop_cpus_hard(other_cpus); #endif Index: head/sys/sparc64/sparc64/mp_machdep.c =================================================================== --- head/sys/sparc64/sparc64/mp_machdep.c +++ head/sys/sparc64/sparc64/mp_machdep.c @@ -493,7 +493,7 @@ if (CPU_CMP(&stopped_cpus, &cpus)) { /* cpus is just a flat "on" mask without curcpu. */ - CPU_NAND(&cpus, &stopped_cpus); + CPU_ANDNOT(&cpus, &stopped_cpus); stop_cpus(cpus); } i = 0; Index: head/sys/sys/bitset.h =================================================================== --- head/sys/sys/bitset.h +++ head/sys/sys/bitset.h @@ -149,13 +149,13 @@ (d)->__bits[__i] = (s1)->__bits[__i] & (s2)->__bits[__i];\ } while (0) -#define BIT_NAND(_s, d, s) do { \ +#define BIT_ANDNOT(_s, d, s) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ (d)->__bits[__i] &= ~(s)->__bits[__i]; \ } while (0) -#define BIT_NAND2(_s, d, s1, s2) do { \ +#define BIT_ANDNOT2(_s, d, s1, s2) do { \ __size_t __i; \ for (__i = 0; __i < __bitset_words((_s)); __i++) \ (d)->__bits[__i] = (s1)->__bits[__i] & ~(s2)->__bits[__i];\ Index: head/sys/sys/cpuset.h =================================================================== --- head/sys/sys/cpuset.h +++ head/sys/sys/cpuset.h @@ -57,7 +57,7 @@ #define CPU_CMP(p, c) BIT_CMP(CPU_SETSIZE, p, c) #define CPU_OR(d, s) BIT_OR(CPU_SETSIZE, d, s) #define CPU_AND(d, s) BIT_AND(CPU_SETSIZE, d, s) -#define CPU_NAND(d, s) BIT_NAND(CPU_SETSIZE, d, s) +#define CPU_ANDNOT(d, s) BIT_ANDNOT(CPU_SETSIZE, d, s) #define CPU_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(CPU_SETSIZE, n, p) #define CPU_SET_ATOMIC(n, p) BIT_SET_ATOMIC(CPU_SETSIZE, n, p) #define CPU_SET_ATOMIC_ACQ(n, p) BIT_SET_ATOMIC_ACQ(CPU_SETSIZE, n, p) Index: head/sys/sys/domainset.h =================================================================== --- head/sys/sys/domainset.h +++ head/sys/sys/domainset.h @@ -58,7 +58,7 @@ #define DOMAINSET_CMP(p, c) BIT_CMP(DOMAINSET_SETSIZE, p, c) #define DOMAINSET_OR(d, s) BIT_OR(DOMAINSET_SETSIZE, d, s) #define DOMAINSET_AND(d, s) BIT_AND(DOMAINSET_SETSIZE, d, s) -#define DOMAINSET_NAND(d, s) BIT_NAND(DOMAINSET_SETSIZE, d, s) +#define DOMAINSET_ANDNOT(d, s) BIT_ANDNOT(DOMAINSET_SETSIZE, d, s) #define DOMAINSET_CLR_ATOMIC(n, p) BIT_CLR_ATOMIC(DOMAINSET_SETSIZE, n, p) #define DOMAINSET_SET_ATOMIC(n, p) BIT_SET_ATOMIC(DOMAINSET_SETSIZE, n, p) #define DOMAINSET_SET_ATOMIC_ACQ(n, p) \ Index: head/sys/x86/x86/cpu_machdep.c =================================================================== --- head/sys/x86/x86/cpu_machdep.c +++ head/sys/x86/x86/cpu_machdep.c @@ -447,7 +447,7 @@ if (smp_started) { map = all_cpus; CPU_CLR(PCPU_GET(cpuid), &map); - CPU_NAND(&map, &stopped_cpus); + CPU_ANDNOT(&map, &stopped_cpus); if (!CPU_EMPTY(&map)) { printf("cpu_reset: Stopping other CPUs\n"); stop_cpus(map);