Changeset 4687a26c in mainline for kernel/generic/src
- Timestamp:
- 2010-11-02T18:29:01Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4f35b9ff
- Parents:
- 76e1121f (diff), 28f4adb (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. - Location:
- kernel/generic/src
- Files:
-
- 4 edited
-
ddi/ddi.c (modified) (1 diff)
-
ipc/kbox.c (modified) (1 diff)
-
main/kinit.c (modified) (1 diff)
-
syscall/syscall.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/ddi.c
r76e1121f r4687a26c 258 258 } 259 259 260 /** Disable or enable preemption.261 * 262 * @param enable If non-zero, the preemption counter will be decremented,263 * leading to potential enabling of preemption. Otherwise264 * the preemption counter will be incremented, preventing265 * preemption from occurring.266 * 267 * @return Zero on success or EPERM if callers capabilities are not sufficient. 268 * 269 */270 unative_t sys_preempt_control(int enable) 271 { 272 if (!( cap_get(TASK) & CAP_PREEMPT_CONTROL))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 273 return EPERM; 274 275 if (enable) 276 preemption_enable(); 277 else 278 preemption_disable(); 279 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 280 287 return 0; 281 288 } -
kernel/generic/src/ipc/kbox.c
r76e1121f r4687a26c 107 107 /* Terminate debugging session (if any). */ 108 108 LOG("Terminate debugging session."); 109 irq_spinlock_lock(&TASK->lock, true);109 mutex_lock(&TASK->udebug.lock); 110 110 udebug_task_cleanup(TASK); 111 irq_spinlock_unlock(&TASK->lock, true);111 mutex_unlock(&TASK->udebug.lock); 112 112 } else { 113 113 LOG("Was not debugger."); -
kernel/generic/src/main/kinit.c
r76e1121f r4687a26c 208 208 */ 209 209 cap_set(programs[i].task, CAP_CAP | CAP_MEM_MANAGER | 210 CAP_IO_MANAGER | CAP_ PREEMPT_CONTROL | CAP_IRQ_REG);210 CAP_IO_MANAGER | CAP_IRQ_REG); 211 211 212 212 if (!ipc_phone_0) -
kernel/generic/src/syscall/syscall.c
r76e1121f r4687a26c 159 159 (syshandler_t) sys_physmem_map, 160 160 (syshandler_t) sys_iospace_enable, 161 (syshandler_t) sys_ preempt_control,161 (syshandler_t) sys_interrupt_enable, 162 162 163 163 /* Sysinfo syscalls */
Note:
See TracChangeset
for help on using the changeset viewer.
