]>
Commit | Line | Data |
---|---|---|
bd3239d2 MF |
1 | typedef unsigned long size_t; |
2 | typedef long ssize_t; | |
3 | typedef long long loff_t; | |
4 | int __test_bit(int nr, const void *addr) | |
5 | { | |
6 | int *a = (int *)addr; | |
7 | int mask; | |
8 | a += nr >> 5; | |
9 | mask = 1 << (nr & 0x1f); | |
10 | return ((mask & *a) != 0); | |
11 | } | |
12 | int test_bit(int nr, const void *addr) | |
13 | { | |
14 | return __test_bit(nr, addr); | |
15 | }; | |
16 | typedef struct { | |
17 | } atomic_t; | |
18 | struct mutex { | |
19 | atomic_t count; | |
20 | void *magic; | |
21 | }; | |
22 | typedef struct cpumask { | |
23 | unsigned long | |
24 | bits[(((1) + (8 * sizeof(long)) - 1) / (8 * sizeof(long)))]; | |
25 | } cpumask_t; | |
26 | struct seq_file { | |
27 | }; | |
28 | typedef int (*initcall_t) (void); | |
29 | struct file_operations { | |
30 | ssize_t(*read) (struct file *, char *, size_t, loff_t *); | |
31 | ssize_t(*write) (struct file *, const char *, size_t, loff_t *); | |
32 | int (*open) (struct inode *, struct file *); | |
33 | } sigval_t; | |
34 | struct trace_array_cpu { | |
35 | atomic_t disabled; | |
36 | }; | |
37 | struct trace_array { | |
38 | struct trace_array_cpu *data[1]; | |
39 | }; | |
40 | cpumask_t tracing_buffer_mask; | |
41 | struct trace_array global_trace; | |
42 | cpumask_t tracing_cpumask; | |
43 | cpumask_t tracing_cpumask_new; | |
44 | struct mutex tracing_cpumask_update_lock; | |
45 | ssize_t tracing_cpumask_read(struct file *filp, char *ubuf, size_t count, | |
46 | loff_t * ppos) | |
47 | { | |
48 | } | |
49 | ssize_t tracing_cpumask_write(struct file *filp, const char *ubuf, | |
50 | size_t count, loff_t * ppos) | |
51 | { | |
52 | int err, cpu; | |
53 | for ((cpu) = 0; (cpu) < 1; (cpu)++, (void)tracing_buffer_mask) { | |
54 | if (test_bit((cpu), (tracing_cpumask).bits) | |
55 | && !test_bit((cpu), (tracing_cpumask_new).bits)) { | |
56 | atomic_inc(&global_trace.data[cpu]->disabled); | |
57 | } | |
58 | if (!test_bit((cpu), (tracing_cpumask).bits) | |
59 | && test_bit((cpu), (tracing_cpumask_new).bits)) { | |
60 | atomic_dec(&global_trace.data[cpu]->disabled); | |
61 | } | |
62 | } | |
63 | } | |
64 | struct file_operations tracing_cpumask_fops; | |
65 | tracer_init_debugfs() | |
66 | { | |
67 | debugfs_create_file( | |
68 | &tracing_cpumask_fops); | |
69 | } | |
70 | initcall_t __initcall_tracer_init_debugfs5 = tracer_init_debugfs; |