Changeset 3698e44 in mainline for kernel/generic/src/udebug/udebug_ipc.c
- Timestamp:
- 2010-01-26T22:46:29Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 196a1439, 2314381
- Parents:
- e515b21a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/udebug/udebug_ipc.c
re515b21a r3698e44 198 198 IPC_SET_ARG3(call->data, needed); 199 199 call->buffer = buffer; 200 201 ipc_answer(&TASK->kb.box, call); 202 } 203 204 /** Process a NAME_READ call. 205 * 206 * Returns a string containing the name of the task. 207 * 208 * @param call The call structure. 209 */ 210 static void udebug_receive_name_read(call_t *call) 211 { 212 unative_t uspace_addr; 213 unative_t to_copy; 214 size_t data_size; 215 size_t buf_size; 216 void *data; 217 218 uspace_addr = IPC_GET_ARG2(call->data); /* Destination address */ 219 buf_size = IPC_GET_ARG3(call->data); /* Dest. buffer size */ 220 221 /* 222 * Read task name. 223 */ 224 udebug_name_read((char **) &data, &data_size); 225 226 /* Copy MAX(buf_size, data_size) bytes */ 227 228 if (buf_size > data_size) 229 to_copy = data_size; 230 else 231 to_copy = buf_size; 232 233 /* 234 * Make use of call->buffer to transfer data to caller's userspace 235 */ 236 237 IPC_SET_RETVAL(call->data, 0); 238 /* ARG1=dest, ARG2=size as in IPC_M_DATA_READ so that 239 same code in process_answer() can be used 240 (no way to distinguish method in answer) */ 241 IPC_SET_ARG1(call->data, uspace_addr); 242 IPC_SET_ARG2(call->data, to_copy); 243 244 IPC_SET_ARG3(call->data, data_size); 245 call->buffer = data; 200 246 201 247 ipc_answer(&TASK->kb.box, call); … … 409 455 udebug_receive_thread_read(call); 410 456 break; 457 case UDEBUG_M_NAME_READ: 458 udebug_receive_name_read(call); 459 break; 411 460 case UDEBUG_M_AREAS_READ: 412 461 udebug_receive_areas_read(call);
Note:
See TracChangeset
for help on using the changeset viewer.