OpenCores
URL https://opencores.org/ocsvn/or1k_soc_on_altera_embedded_dev_kit/or1k_soc_on_altera_embedded_dev_kit/trunk

Subversion Repositories or1k_soc_on_altera_embedded_dev_kit

[/] [or1k_soc_on_altera_embedded_dev_kit/] [trunk/] [linux-2.6/] [linux-2.6.24/] [lib/] [cpumask.c] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 xianfeng
#include <linux/kernel.h>
2
#include <linux/bitops.h>
3
#include <linux/cpumask.h>
4
#include <linux/module.h>
5
 
6
int __first_cpu(const cpumask_t *srcp)
7
{
8
        return min_t(int, NR_CPUS, find_first_bit(srcp->bits, NR_CPUS));
9
}
10
EXPORT_SYMBOL(__first_cpu);
11
 
12
int __next_cpu(int n, const cpumask_t *srcp)
13
{
14
        return min_t(int, NR_CPUS, find_next_bit(srcp->bits, NR_CPUS, n+1));
15
}
16
EXPORT_SYMBOL(__next_cpu);
17
 
18
int __any_online_cpu(const cpumask_t *mask)
19
{
20
        int cpu;
21
 
22
        for_each_cpu_mask(cpu, *mask) {
23
                if (cpu_online(cpu))
24
                        break;
25
        }
26
        return cpu;
27
}
28
EXPORT_SYMBOL(__any_online_cpu);

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.