Changeset 86939b1 in mainline
- Timestamp:
- 2012-08-13T14:12:19Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1cb75de
- Parents:
- cfaa35a
- Location:
- kernel/generic
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/include/ipc/ipc.h
rcfaa35a r86939b1 106 106 107 107 typedef struct { 108 /** Task link. */ 109 link_t ta_link; 110 108 111 /** Answerbox link. */ 109 112 link_t ab_link; -
kernel/generic/include/proc/task.h
rcfaa35a r86939b1 91 91 92 92 /* IPC stuff */ 93 answerbox_t answerbox; /**< Communication endpoint */ 93 94 /** Receiving communication endpoint */ 95 answerbox_t answerbox; 96 97 /** Sending communication endpoints */ 94 98 phone_t phones[IPC_MAX_PHONES]; 95 stats_ipc_t ipc_info; /**< IPC statistics */ 99 100 /** Spinlock protecting the active_calls list. */ 101 SPINLOCK_DECLARE(active_calls_lock); 102 103 /** 104 * List of all calls sent by this task that have not yet been 105 * answered. 106 */ 107 list_t active_calls; 108 96 109 event_t events[EVENT_TASK_END - EVENT_END]; 110 111 /** IPC statistics */ 112 stats_ipc_t ipc_info; 97 113 98 114 #ifdef CONFIG_UDEBUG -
kernel/generic/src/ipc/ipc.c
rcfaa35a r86939b1 230 230 call->data.phone = phone; 231 231 atomic_inc(&phone->active_calls); 232 233 spinlock_lock(&TASK->active_calls_lock); 234 list_append(&call->ta_link, &TASK->active_calls); 235 spinlock_unlock(&TASK->active_calls_lock); 236 232 237 IPC_SET_RETVAL(call->data, err); 233 238 _ipc_answer_free_call(call, false); … … 250 255 if (!(call->flags & IPC_CALL_FORWARDED)) { 251 256 atomic_inc(&phone->active_calls); 257 258 spinlock_lock(&TASK->active_calls_lock); 259 list_append(&call->ta_link, &TASK->active_calls); 260 spinlock_unlock(&TASK->active_calls_lock); 261 252 262 call->data.phone = phone; 253 263 call->data.task_id = TASK->taskid; … … 419 429 list_remove(&request->ab_link); 420 430 atomic_dec(&request->data.phone->active_calls); 431 432 /* 433 * Remove the call from this task's active call list. 434 */ 435 spinlock_lock(&TASK->active_calls_lock); 436 list_remove(&request->ta_link); 437 spinlock_unlock(&TASK->active_calls_lock); 421 438 } else if (!list_empty(&box->calls)) { 422 439 /* Count received call */ -
kernel/generic/src/proc/task.c
rcfaa35a r86939b1 162 162 for (i = 0; i < IPC_MAX_PHONES; i++) 163 163 ipc_phone_init(&task->phones[i]); 164 165 spinlock_initialize(&task->active_calls_lock, "active_calls_lock"); 166 list_initialize(&task->active_calls); 164 167 165 168 #ifdef CONFIG_UDEBUG
Note:
See TracChangeset
for help on using the changeset viewer.