Rev 1434 | Rev 1502 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1434 | Rev 1461 | ||
---|---|---|---|
Line 134... | Line 134... | ||
134 | &TASK->answerbox); |
134 | &TASK->answerbox); |
135 | } |
135 | } |
136 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_SEND) { |
136 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_SEND) { |
137 | if (!IPC_GET_RETVAL(answer->data)) { /* Accepted, handle as_area receipt */ |
137 | if (!IPC_GET_RETVAL(answer->data)) { /* Accepted, handle as_area receipt */ |
138 | ipl_t ipl; |
138 | ipl_t ipl; |
- | 139 | int rc; |
|
139 | as_t *as; |
140 | as_t *as; |
140 | 141 | ||
141 | ipl = interrupts_disable(); |
142 | ipl = interrupts_disable(); |
142 | spinlock_lock(&answer->sender->lock); |
143 | spinlock_lock(&answer->sender->lock); |
143 | as = answer->sender->as; |
144 | as = answer->sender->as; |
144 | spinlock_unlock(&answer->sender->lock); |
145 | spinlock_unlock(&answer->sender->lock); |
145 | interrupts_restore(ipl); |
146 | interrupts_restore(ipl); |
146 | 147 | ||
147 | return as_area_share(as, IPC_GET_ARG1(*olddata), IPC_GET_ARG2(*olddata), |
148 | rc = as_area_share(as, IPC_GET_ARG1(*olddata), IPC_GET_ARG2(*olddata), |
148 | AS, IPC_GET_ARG1(answer->data), IPC_GET_ARG3(*olddata)); |
149 | AS, IPC_GET_ARG1(answer->data), IPC_GET_ARG3(*olddata)); |
- | 150 | IPC_SET_RETVAL(answer->data, rc); |
|
- | 151 | return rc; |
|
149 | } |
152 | } |
150 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_RECV) { |
153 | } else if (IPC_GET_METHOD(*olddata) == IPC_M_AS_AREA_RECV) { |
151 | if (!IPC_GET_RETVAL(answer->data)) { |
154 | if (!IPC_GET_RETVAL(answer->data)) { |
152 | ipl_t ipl; |
155 | ipl_t ipl; |
153 | as_t *as; |
156 | as_t *as; |
Line 158... | Line 161... | ||
158 | as = answer->sender->as; |
161 | as = answer->sender->as; |
159 | spinlock_unlock(&answer->sender->lock); |
162 | spinlock_unlock(&answer->sender->lock); |
160 | interrupts_restore(ipl); |
163 | interrupts_restore(ipl); |
161 | 164 | ||
162 | rc = as_area_share(AS, IPC_GET_ARG1(answer->data), IPC_GET_ARG2(*olddata), |
165 | rc = as_area_share(AS, IPC_GET_ARG1(answer->data), IPC_GET_ARG2(*olddata), |
163 | as, IPC_GET_ARG1(*olddata), IPC_GET_ARG3(*olddata)); |
166 | as, IPC_GET_ARG1(*olddata), IPC_GET_ARG2(answer->data)); |
164 | IPC_SET_RETVAL(answer->data, rc); |
167 | IPC_SET_RETVAL(answer->data, rc); |
165 | } |
168 | } |
166 | } |
169 | } |
167 | return 0; |
170 | return 0; |
168 | } |
171 | } |