Changeset 1b11576d in mainline for kernel/generic/src/ddi/ddi.c
- Timestamp:
- 2010-10-23T16:04:12Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- c77b4d6
- Parents:
- 84c20da (diff), 58b833c (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/ddi.c
r84c20da r1b11576d 258 258 } 259 259 260 /** Disable or enable specified interrupts. 261 * 262 * @param irq the interrupt to be enabled/disabled. 263 * @param enable if true enable the interrupt, disable otherwise. 264 * 265 * @retutn Zero on success, error code otherwise. 266 */ 267 unative_t sys_interrupt_enable(int irq, int enable) 268 { 269 /* FIXME: this needs to be generic code, or better not be in kernel at all. */ 270 #if 0 271 cap_t task_cap = cap_get(TASK); 272 if (!(task_cap & CAP_IRQ_REG)) 273 return EPERM; 274 275 if (irq < 0 || irq > 16) { 276 return EINVAL; 277 } 278 279 uint16_t irq_mask = (uint16_t)(1 << irq); 280 if (enable) { 281 trap_virtual_enable_irqs(irq_mask); 282 } else { 283 trap_virtual_disable_irqs(irq_mask); 284 } 285 286 #endif 287 return 0; 288 } 289 260 290 /** @} 261 291 */
Note:
See TracChangeset
for help on using the changeset viewer.