Changes in / [4039c77:e2fcdb1] in mainline
- Location:
- kernel/generic/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/interrupt/interrupt.c
r4039c77 re2fcdb1 93 93 94 94 /* Account user cycles */ 95 if (THREAD) 95 if (THREAD) { 96 spinlock_lock(&THREAD->lock); 96 97 thread_update_accounting(true); 98 spinlock_unlock(&THREAD->lock); 99 } 97 100 98 101 #ifdef CONFIG_UDEBUG … … 110 113 thread_exit(); 111 114 112 if (THREAD) 115 if (THREAD) { 116 spinlock_lock(&THREAD->lock); 113 117 thread_update_accounting(false); 118 spinlock_unlock(&THREAD->lock); 119 } 114 120 } 115 121 -
kernel/generic/src/syscall/syscall.c
r4039c77 re2fcdb1 60 60 { 61 61 unative_t rc; 62 ipl_t ipl; 62 63 63 64 /* Do userpace accounting */ 65 ipl = interrupts_disable(); 66 spinlock_lock(&THREAD->lock); 64 67 thread_update_accounting(true); 68 spinlock_unlock(&THREAD->lock); 69 interrupts_restore(ipl); 65 70 66 71 #ifdef CONFIG_UDEBUG … … 100 105 101 106 /* Do kernel accounting */ 107 (void) interrupts_disable(); 108 spinlock_lock(&THREAD->lock); 102 109 thread_update_accounting(false); 110 spinlock_unlock(&THREAD->lock); 111 interrupts_restore(ipl); 103 112 104 113 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.