Changeset 170332d in mainline
- Timestamp:
- 2010-04-26T11:35:36Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 556f9892
- Parents:
- d69f959
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/ipc.c
rd69f959 r170332d 218 218 answerbox_t *callerbox = call->callerbox; 219 219 bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox)); 220 ipl_t ipl; 220 221 221 222 /* Count sent answer */ 223 ipl = interrupts_disable(); 222 224 spinlock_lock(&TASK->lock); 223 225 TASK->ipc_info.answer_sent++; 224 226 spinlock_unlock(&TASK->lock); 227 interrupts_restore(ipl); 225 228 226 229 call->flags |= IPC_CALL_ANSWERED; … … 281 284 static void _ipc_call(phone_t *phone, answerbox_t *box, call_t *call) 282 285 { 286 ipl_t ipl; 287 283 288 /* Count sent ipc call */ 289 ipl = interrupts_disable(); 284 290 spinlock_lock(&TASK->lock); 285 291 TASK->ipc_info.call_sent++; 286 292 spinlock_unlock(&TASK->lock); 293 interrupts_restore(ipl); 287 294 288 295 if (!(call->flags & IPC_CALL_FORWARDED)) { … … 386 393 int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode) 387 394 { 395 ipl_t ipl; 396 388 397 /* Count forwarded calls */ 398 ipl = interrupts_disable(); 389 399 spinlock_lock(&TASK->lock); 390 400 TASK->ipc_info.forwarded++; 391 401 spinlock_unlock(&TASK->lock); 402 interrupts_restore(ipl); 392 403 393 404 spinlock_lock(&oldbox->lock); … … 680 691 call_t *call; 681 692 link_t *tmp; 693 ipl_t ipl; 682 694 695 ipl = interrupts_disable(); 683 696 spinlock_lock(&tasks_lock); 684 697 task = task_find_by_id(taskid); … … 686 699 spinlock_lock(&task->lock); 687 700 spinlock_unlock(&tasks_lock); 688 if (!task) 701 if (!task) { 702 interrupts_restore(ipl); 689 703 return; 704 } 690 705 691 706 /* Print opened phones & details */ … … 770 785 spinlock_unlock(&task->answerbox.lock); 771 786 spinlock_unlock(&task->lock); 787 interrupts_restore(ipl); 772 788 } 773 789
Note:
See TracChangeset
for help on using the changeset viewer.