| 144 | } |
| 145 | |
| 146 | int |
| 147 | perfmon_get(int pmc, unsigned int *control) |
| 148 | { |
| 149 | if (pmc < 0 || pmc >= NPMC) |
| 150 | return EINVAL; |
| 151 | |
| 152 | if (perfmon_inuse & (1 << pmc)) { |
| 153 | *control = ctl_shadow[pmc]; |
| 154 | return 0; |
| 155 | } |
| 156 | return EBUSY; /* XXX reversed sense */ |
| 157 | } |
| 158 | |
| 159 | int |
| 160 | perfmon_fini(int pmc) |