Rev 2676 | Rev 2745 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2676 | Rev 2677 | ||
---|---|---|---|
Line 110... | Line 110... | ||
110 | * Otherwise return 0. |
110 | * Otherwise return 0. |
111 | */ |
111 | */ |
112 | static inline int method_is_immutable(unative_t method) |
112 | static inline int method_is_immutable(unative_t method) |
113 | { |
113 | { |
114 | switch (method) { |
114 | switch (method) { |
115 | case IPC_M_AS_AREA_SEND: |
115 | case IPC_M_SHARE_OUT: |
116 | case IPC_M_AS_AREA_RECV: |
116 | case IPC_M_SHARE_IN: |
117 | case IPC_M_DATA_WRITE: |
117 | case IPC_M_DATA_WRITE: |
118 | case IPC_M_DATA_READ: |
118 | case IPC_M_DATA_READ: |
119 | return 1; |
119 | return 1; |
120 | break; |
120 | break; |
121 | default: |
121 | default: |
Line 139... | Line 139... | ||
139 | static inline int answer_need_old(call_t *call) |
139 | static inline int answer_need_old(call_t *call) |
140 | { |
140 | { |
141 | switch (IPC_GET_METHOD(call->data)) { |
141 | switch (IPC_GET_METHOD(call->data)) { |
142 | case IPC_M_CONNECT_TO_ME: |
142 | case IPC_M_CONNECT_TO_ME: |
143 | case IPC_M_CONNECT_ME_TO: |
143 | case IPC_M_CONNECT_ME_TO: |
144 | case IPC_M_AS_AREA_SEND: |
144 | case IPC_M_SHARE_OUT: |
145 | case IPC_M_AS_AREA_RECV: |
145 | case IPC_M_SHARE_IN: |
146 | case IPC_M_DATA_WRITE: |
146 | case IPC_M_DATA_WRITE: |
147 | case IPC_M_DATA_READ: |
147 | case IPC_M_DATA_READ: |
148 | return 1; |
148 | return 1; |
149 | default: |
149 | default: |
150 | return 0; |
150 | return 0; |
Line 197... | Line 197... | ||
197 | /* If the users accepted call, connect */ |
197 | /* If the users accepted call, connect */ |
198 | if (!IPC_GET_RETVAL(answer->data)) { |
198 | if (!IPC_GET_RETVAL(answer->data)) { |
199 | ipc_phone_connect((phone_t *) IPC_GET_ARG5(*olddata), |
199 | ipc_phone_connect((phone_t *) IPC_GET_ARG5(*olddata), |
200 | &TASK->answerbox); |
200 | &TASK->answerbox); |
201 | } |
201 | } |
202 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_SEND) { |
202 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_SHARE_OUT) { |
203 | if (!IPC_GET_RETVAL(answer->data)) { |
203 | if (!IPC_GET_RETVAL(answer->data)) { |
204 | /* Accepted, handle as_area receipt */ |
204 | /* Accepted, handle as_area receipt */ |
205 | ipl_t ipl; |
205 | ipl_t ipl; |
206 | int rc; |
206 | int rc; |
207 | as_t *as; |
207 | as_t *as; |
Line 216... | Line 216... | ||
216 | IPC_GET_ARG2(*olddata), AS, |
216 | IPC_GET_ARG2(*olddata), AS, |
217 | IPC_GET_ARG1(answer->data), IPC_GET_ARG3(*olddata)); |
217 | IPC_GET_ARG1(answer->data), IPC_GET_ARG3(*olddata)); |
218 | IPC_SET_RETVAL(answer->data, rc); |
218 | IPC_SET_RETVAL(answer->data, rc); |
219 | return rc; |
219 | return rc; |
220 | } |
220 | } |
221 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_RECV) { |
221 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_SHARE_IN) { |
222 | if (!IPC_GET_RETVAL(answer->data)) { |
222 | if (!IPC_GET_RETVAL(answer->data)) { |
223 | ipl_t ipl; |
223 | ipl_t ipl; |
224 | as_t *as; |
224 | as_t *as; |
225 | int rc; |
225 | int rc; |
226 | 226 | ||
Line 311... | Line 311... | ||
311 | /* Set arg5 for server */ |
311 | /* Set arg5 for server */ |
312 | IPC_SET_ARG5(call->data, (unative_t) &TASK->phones[newphid]); |
312 | IPC_SET_ARG5(call->data, (unative_t) &TASK->phones[newphid]); |
313 | call->flags |= IPC_CALL_CONN_ME_TO; |
313 | call->flags |= IPC_CALL_CONN_ME_TO; |
314 | call->priv = newphid; |
314 | call->priv = newphid; |
315 | break; |
315 | break; |
316 | case IPC_M_AS_AREA_SEND: |
316 | case IPC_M_SHARE_OUT: |
317 | size = as_area_get_size(IPC_GET_ARG1(call->data)); |
317 | size = as_area_get_size(IPC_GET_ARG1(call->data)); |
318 | if (!size) |
318 | if (!size) |
319 | return EPERM; |
319 | return EPERM; |
320 | IPC_SET_ARG2(call->data, size); |
320 | IPC_SET_ARG2(call->data, size); |
321 | break; |
321 | break; |