cpumask.c (498495dba268b20e8eadd7fe93c140c68b6cc9d2) | cpumask.c (0ade34c37012ea5c516d9aa4d19a56e9f40a55ed) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2#include <linux/slab.h> 3#include <linux/kernel.h> 4#include <linux/bitops.h> 5#include <linux/cpumask.h> 6#include <linux/export.h> 7#include <linux/bootmem.h> 8 --- 19 unchanged lines hidden (view full) --- 28 * @src1p: the first cpumask pointer 29 * @src2p: the second cpumask pointer 30 * 31 * Returns >= nr_cpu_ids if no further cpus set in both. 32 */ 33int cpumask_next_and(int n, const struct cpumask *src1p, 34 const struct cpumask *src2p) 35{ | 1// SPDX-License-Identifier: GPL-2.0 2#include <linux/slab.h> 3#include <linux/kernel.h> 4#include <linux/bitops.h> 5#include <linux/cpumask.h> 6#include <linux/export.h> 7#include <linux/bootmem.h> 8 --- 19 unchanged lines hidden (view full) --- 28 * @src1p: the first cpumask pointer 29 * @src2p: the second cpumask pointer 30 * 31 * Returns >= nr_cpu_ids if no further cpus set in both. 32 */ 33int cpumask_next_and(int n, const struct cpumask *src1p, 34 const struct cpumask *src2p) 35{ |
36 while ((n = cpumask_next(n, src1p)) < nr_cpu_ids) 37 if (cpumask_test_cpu(n, src2p)) 38 break; 39 return n; | 36 /* -1 is a legal arg here. */ 37 if (n != -1) 38 cpumask_check(n); 39 return find_next_and_bit(cpumask_bits(src1p), cpumask_bits(src2p), 40 nr_cpumask_bits, n + 1); |
40} 41EXPORT_SYMBOL(cpumask_next_and); 42 43/** 44 * cpumask_any_but - return a "random" in a cpumask, but not this one. 45 * @mask: the cpumask to search 46 * @cpu: the cpu to ignore. 47 * --- 182 unchanged lines hidden --- | 41} 42EXPORT_SYMBOL(cpumask_next_and); 43 44/** 45 * cpumask_any_but - return a "random" in a cpumask, but not this one. 46 * @mask: the cpumask to search 47 * @cpu: the cpu to ignore. 48 * --- 182 unchanged lines hidden --- |