Blame view

lib/cpumask.c 609 Bytes
ccb46000f   Andrew Morton   [PATCH] cpumask: ...
1
2
3
4
5
6
7
8
9
10
  #include <linux/kernel.h>
  #include <linux/bitops.h>
  #include <linux/cpumask.h>
  #include <linux/module.h>
  
  int __first_cpu(const cpumask_t *srcp)
  {
  	return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS));
  }
  EXPORT_SYMBOL(__first_cpu);
3d18bd74a   Andrew Morton   [PATCH] cpumask: ...
11
12
13
14
15
  int __next_cpu(int n, const cpumask_t *srcp)
  {
  	return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
  }
  EXPORT_SYMBOL(__next_cpu);
863028207   Andrew Morton   [PATCH] cpumask: ...
16

53b8a315b   Christoph Lameter   [PATCH] Convert h...
17
18
  int nr_cpu_ids;
  EXPORT_SYMBOL(nr_cpu_ids);
96a9b4d31   Andrew Morton   [PATCH] cpumask: ...
19
20
21
22
23
24
25
26
27
28
29
30
  
  int __any_online_cpu(const cpumask_t *mask)
  {
  	int cpu;
  
  	for_each_cpu_mask(cpu, *mask) {
  		if (cpu_online(cpu))
  			break;
  	}
  	return cpu;
  }
  EXPORT_SYMBOL(__any_online_cpu);