Rev 2827 | Rev 2834 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2827 | Rev 2833 | ||
---|---|---|---|
Line 161... | Line 161... | ||
161 | static int udebug_rp_args_read(call_t *call, phone_t *phone) |
161 | static int udebug_rp_args_read(call_t *call, phone_t *phone) |
162 | { |
162 | { |
163 | thread_t *t; |
163 | thread_t *t; |
164 | task_t *ta; |
164 | task_t *ta; |
165 | void *uspace_buffer; |
165 | void *uspace_buffer; |
166 | unative_t to_copy; |
- | |
167 | int rc; |
166 | int rc; |
168 | ipl_t ipl; |
167 | ipl_t ipl; |
169 | unative_t buffer[6]; |
168 | unative_t buffer[6]; |
170 | 169 | ||
171 | klog_printf("debug_args_read()"); |
170 | klog_printf("debug_args_read()"); |
Line 201... | Line 200... | ||
201 | interrupts_restore(ipl); |
200 | interrupts_restore(ipl); |
202 | 201 | ||
203 | /* Now copy to userspace */ |
202 | /* Now copy to userspace */ |
204 | 203 | ||
205 | uspace_buffer = (void *)IPC_GET_ARG3(call->data); |
204 | uspace_buffer = (void *)IPC_GET_ARG3(call->data); |
206 | to_copy = IPC_GET_ARG4(call->data); |
- | |
207 | if (to_copy > 6 * sizeof(unative_t)) to_copy = 6 * sizeof(unative_t); |
- | |
208 | 205 | ||
209 | rc = copy_to_uspace(uspace_buffer, buffer, to_copy); |
206 | rc = copy_to_uspace(uspace_buffer, buffer, 6 * sizeof(unative_t)); |
210 | if (rc != 0) { |
207 | if (rc != 0) { |
211 | spinlock_unlock(&ta->lock); |
208 | spinlock_unlock(&ta->lock); |
212 | klog_printf("debug_args_read() - copy failed"); |
209 | klog_printf("debug_args_read() - copy failed"); |
213 | return rc; |
210 | return rc; |
214 | } |
211 | } |
215 | 212 | ||
216 | IPC_SET_ARG1(call->data, to_copy); |
- | |
217 | - | ||
218 | klog_printf("debug_args_read() done"); |
213 | klog_printf("debug_args_read() done"); |
219 | return 1; /* actually need becksend with retval 0 */ |
214 | return 1; /* actually need becksend with retval 0 */ |
220 | } |
215 | } |
221 | 216 | ||
222 | static int udebug_rp_regs_read(call_t *call, phone_t *phone) |
217 | static int udebug_rp_regs_read(call_t *call, phone_t *phone) |