.. | .. |
---|
261 | 261 | return next; |
---|
262 | 262 | } |
---|
263 | 263 | EXPORT_SYMBOL(cpumask_any_and_distribute); |
---|
264 | | - |
---|
265 | | -int cpumask_any_distribute(const struct cpumask *srcp) |
---|
266 | | -{ |
---|
267 | | - int next, prev; |
---|
268 | | - |
---|
269 | | - /* NOTE: our first selection will skip 0. */ |
---|
270 | | - prev = __this_cpu_read(distribute_cpu_mask_prev); |
---|
271 | | - |
---|
272 | | - next = cpumask_next(prev, srcp); |
---|
273 | | - if (next >= nr_cpu_ids) |
---|
274 | | - next = cpumask_first(srcp); |
---|
275 | | - |
---|
276 | | - if (next < nr_cpu_ids) |
---|
277 | | - __this_cpu_write(distribute_cpu_mask_prev, next); |
---|
278 | | - |
---|
279 | | - return next; |
---|
280 | | -} |
---|
281 | | -EXPORT_SYMBOL(cpumask_any_distribute); |
---|