Rev 1288 | Rev 1409 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1288 | Rev 1297 | ||
---|---|---|---|
Line 209... | Line 209... | ||
209 | if (rc != 0) |
209 | if (rc != 0) |
210 | return (__native) rc; |
210 | return (__native) rc; |
211 | 211 | ||
212 | return (__native) ddi_iospace_enable((task_id_t) arg.task_id, (__address) arg.ioaddr, (size_t) arg.size); |
212 | return (__native) ddi_iospace_enable((task_id_t) arg.task_id, (__address) arg.ioaddr, (size_t) arg.size); |
213 | } |
213 | } |
- | 214 | ||
- | 215 | /** Disable or enable preemption. |
|
- | 216 | * |
|
- | 217 | * @param enable If non-zero, the preemption counter will be decremented, leading to potential |
|
- | 218 | * enabling of preemption. Otherwise the preemption counter will be incremented, |
|
- | 219 | * preventing preemption from occurring. |
|
- | 220 | * |
|
- | 221 | * @return Zero on success or EPERM if callers capabilities are not sufficient. |
|
- | 222 | */ |
|
- | 223 | __native sys_preempt_control(int enable) |
|
- | 224 | { |
|
- | 225 | if (! cap_get(TASK) & CAP_PREEMPT_CONTROL) |
|
- | 226 | return EPERM; |
|
- | 227 | if (enable) |
|
- | 228 | preemption_enable(); |
|
- | 229 | else |
|
- | 230 | preemption_disable(); |
|
- | 231 | return 0; |
|
- | 232 | } |