]>
Commit | Line | Data |
---|---|---|
bd3239d2 MF |
1 | int test_bit(int nr, void *addr) |
2 | { | |
3 | int *a = (int *)addr; | |
4 | int mask; | |
5 | a += nr; | |
6 | mask = 1 << nr; | |
7 | return mask & *a; | |
8 | } | |
9 | struct { | |
10 | struct { | |
11 | int disabled; | |
12 | } *data[1]; | |
13 | } trace; | |
14 | struct { | |
15 | unsigned bits[1]; | |
16 | } cpumask; | |
17 | foo() | |
18 | { | |
19 | int cpu; | |
20 | for (cpu = 0; cpu < 1; cpu++) { | |
21 | if (test_bit(cpu, cpumask.bits)) | |
22 | inc(&trace.data[cpu]->disabled); | |
23 | if (!test_bit(cpu, cpumask.bits)) | |
24 | dec(&trace.data[cpu]->disabled); | |
25 | } | |
26 | } |