Changeset da1bafb in mainline for kernel/generic/src/syscall/syscall.c
- Timestamp:
- 2010-05-24T18:57:31Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 0095368
- Parents:
- 666f492
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/syscall/syscall.c
r666f492 rda1bafb 59 59 unative_t a4, unative_t a5, unative_t a6, unative_t id) 60 60 { 61 unative_t rc;62 ipl_t ipl;63 64 61 /* Do userpace accounting */ 65 ipl = interrupts_disable(); 66 spinlock_lock(&THREAD->lock); 62 irq_spinlock_lock(&THREAD->lock, true); 67 63 thread_update_accounting(true); 68 spinlock_unlock(&THREAD->lock); 69 interrupts_restore(ipl); 70 64 irq_spinlock_unlock(&THREAD->lock, true); 65 71 66 #ifdef CONFIG_UDEBUG 72 67 /* 73 68 * Early check for undebugged tasks. We do not lock anything as this 74 69 * test need not be precise in either direction. 70 * 75 71 */ 76 if (THREAD->udebug.active) {72 if (THREAD->udebug.active) 77 73 udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false); 78 }79 74 #endif 80 75 76 unative_t rc; 81 77 if (id < SYSCALL_END) { 82 78 rc = syscall_table[id](a1, a2, a3, a4, a5, a6); … … 93 89 if (THREAD->udebug.active) { 94 90 udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true); 95 91 96 92 /* 97 93 * Stopping point needed for tasks that only invoke … … 103 99 } 104 100 #endif 105 101 106 102 /* Do kernel accounting */ 107 (void) interrupts_disable(); 108 spinlock_lock(&THREAD->lock); 103 irq_spinlock_lock(&THREAD->lock, true); 109 104 thread_update_accounting(false); 110 spinlock_unlock(&THREAD->lock); 111 interrupts_restore(ipl); 105 irq_spinlock_unlock(&THREAD->lock, true); 112 106 113 107 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.