Changeset 88dea9d in mainline for kernel/generic/src/ipc/ipc.c
- Timestamp:
- 2010-04-17T16:28:49Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 30a5470
- Parents:
- 5ba201d (diff), 95319bd (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/ipc/ipc.c
r5ba201d r88dea9d 219 219 bool do_lock = ((!selflocked) || callerbox != (&TASK->answerbox)); 220 220 221 /* Count sent answer */ 222 spinlock_lock(&TASK->lock); 223 TASK->ipc_info.answer_sent++; 224 spinlock_unlock(&TASK->lock); 225 221 226 call->flags |= IPC_CALL_ANSWERED; 222 227 … … 276 281 static void _ipc_call(phone_t *phone, answerbox_t *box, call_t *call) 277 282 { 283 /* Count sent ipc call */ 284 spinlock_lock(&TASK->lock); 285 TASK->ipc_info.call_sent++; 286 spinlock_unlock(&TASK->lock); 287 278 288 if (!(call->flags & IPC_CALL_FORWARDED)) { 279 289 atomic_inc(&phone->active_calls); … … 376 386 int ipc_forward(call_t *call, phone_t *newphone, answerbox_t *oldbox, int mode) 377 387 { 388 /* Count forwarded calls */ 389 spinlock_lock(&TASK->lock); 390 TASK->ipc_info.forwarded++; 391 spinlock_unlock(&TASK->lock); 392 378 393 spinlock_lock(&oldbox->lock); 379 394 list_remove(&call->link); … … 416 431 spinlock_lock(&box->lock); 417 432 if (!list_empty(&box->irq_notifs)) { 433 434 /* Count recieved IRQ notification */ 435 spinlock_lock(&TASK->lock); 436 TASK->ipc_info.irq_notif_recieved++; 437 spinlock_unlock(&TASK->lock); 438 418 439 ipl = interrupts_disable(); 419 440 spinlock_lock(&box->irq_lock); … … 425 446 interrupts_restore(ipl); 426 447 } else if (!list_empty(&box->answers)) { 448 /* Count recieved answer */ 449 spinlock_lock(&TASK->lock); 450 TASK->ipc_info.answer_recieved++; 451 spinlock_unlock(&TASK->lock); 452 427 453 /* Handle asynchronous answers */ 428 454 request = list_get_instance(box->answers.next, call_t, link); … … 430 456 atomic_dec(&request->data.phone->active_calls); 431 457 } else if (!list_empty(&box->calls)) { 458 /* Count recieved call */ 459 spinlock_lock(&TASK->lock); 460 TASK->ipc_info.call_recieved++; 461 spinlock_unlock(&TASK->lock); 462 432 463 /* Handle requests */ 433 464 request = list_get_instance(box->calls.next, call_t, link);
Note:
See TracChangeset
for help on using the changeset viewer.