Changeset b800b0e in mainline for kernel/generic/include/ipc/ipc.h
- Timestamp:
- 2012-10-23T13:16:49Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6ecf5b8
- Parents:
- 32b3a12 (diff), b2ac3998 (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/include/ipc/ipc.h
r32b3a12 rb800b0e 65 65 mutex_t lock; 66 66 link_t link; 67 struct task *caller; 67 68 struct answerbox *callee; 68 69 ipc_phone_state_t state; … … 72 73 typedef struct answerbox { 73 74 IRQ_SPINLOCK_DECLARE(lock); 75 76 /** Answerbox is active until it enters cleanup. */ 77 bool active; 74 78 75 79 struct task *task; … … 106 110 107 111 typedef struct { 108 link_t link; 112 /** 113 * Task link. 114 * Valid only when the call is not forgotten. 115 * Protected by the task's active_calls_lock. 116 */ 117 link_t ta_link; 118 119 atomic_t refcnt; 120 121 /** Answerbox link. */ 122 link_t ab_link; 109 123 110 124 unsigned int flags; 125 126 /** Protects the forget member. */ 127 SPINLOCK_DECLARE(forget_lock); 128 129 /** 130 * True if the caller 'forgot' this call and donated it to the callee. 131 * Forgotten calls are discarded upon answering (the answer is not 132 * delivered) and answered calls cannot be forgotten. Forgotten calls 133 * also do not figure on the task's active call list. 134 * 135 * We keep this separate from the flags so that it is not necessary 136 * to take a lock when accessing them. 137 */ 138 bool forget; 139 140 /** True if the call is in the active list. */ 141 bool active; 111 142 112 /** Identification of the caller. */ 143 /** 144 * Identification of the caller. 145 * Valid only when the call is not forgotten. 146 */ 113 147 struct task *sender; 148 149 /** Phone which was used to send the call. */ 150 phone_t *caller_phone; 114 151 115 152 /** Private data to internal IPC. */ … … 118 155 /** Data passed from/to userspace. */ 119 156 ipc_data_t data; 120 157 158 /** Method as it was sent in the request. */ 159 sysarg_t request_method; 160 121 161 /** Buffer for IPC_M_DATA_WRITE and IPC_M_DATA_READ. */ 122 162 uint8_t *buffer; 123 124 /*125 * The forward operation can masquerade the caller phone. For those126 * cases, we must keep it aside so that the answer is processed127 * correctly.128 */129 phone_t *caller_phone;130 163 } call_t; 131 164 … … 136 169 extern call_t *ipc_call_alloc(unsigned int); 137 170 extern void ipc_call_free(call_t *); 171 extern void ipc_call_hold(call_t *); 172 extern void ipc_call_release(call_t *); 138 173 139 174 extern int ipc_call(phone_t *, call_t *); … … 141 176 extern int ipc_forward(call_t *, phone_t *, answerbox_t *, unsigned int); 142 177 extern void ipc_answer(answerbox_t *, call_t *); 178 extern void _ipc_answer_free_call(call_t *, bool); 143 179 144 extern void ipc_phone_init(phone_t * );145 extern voidipc_phone_connect(phone_t *, answerbox_t *);180 extern void ipc_phone_init(phone_t *, struct task *); 181 extern bool ipc_phone_connect(phone_t *, answerbox_t *); 146 182 extern int ipc_phone_hangup(phone_t *); 147 183 … … 151 187 extern void ipc_backsend_err(phone_t *, call_t *, sysarg_t); 152 188 extern void ipc_answerbox_slam_phones(answerbox_t *, bool); 153 extern void ipc_cleanup_call_list( list_t *);189 extern void ipc_cleanup_call_list(answerbox_t *, list_t *); 154 190 155 191 extern void ipc_print_task(task_id_t);
Note:
See TracChangeset
for help on using the changeset viewer.