175,7 → 175,14 |
size_t n; |
int rc; |
|
rc = udebug_thread_read(&buffer, &n); |
uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */ |
buf_size = IPC_GET_ARG3(call->data); /* Dest. buffer size */ |
|
/* |
* Read thread list. Variable n will be filled with actual number |
* of threads times thread-id size. |
*/ |
rc = udebug_thread_read(&buffer, buf_size, &n); |
if (rc < 0) { |
IPC_SET_RETVAL(call->data, rc); |
ipc_answer(&TASK->kernel_box, call); |
182,20 → 189,19 |
return; |
} |
|
/* |
* Make use of call->buffer to transfer data to caller's userspace |
*/ |
total_bytes = n; |
|
uspace_addr = IPC_GET_ARG2(call->data); |
buf_size = IPC_GET_ARG3(call->data); |
/* Copy MAX(buf_size, total_bytes) bytes */ |
|
total_bytes = n; |
|
if (buf_size > total_bytes) |
to_copy = total_bytes; |
else |
to_copy = buf_size; |
|
/* |
* Make use of call->buffer to transfer data to caller's userspace |
*/ |
|
IPC_SET_RETVAL(call->data, 0); |
/* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that |
same code in process_answer() can be used |