Changeset 9a1b20c in mainline for kernel/generic/src/ipc/sysipc.c
- Timestamp:
- 2008-09-17T12:16:27Z (16 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- fb9b0b0
- Parents:
- 06a195bc
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
r06a195bc r9a1b20c 43 43 #include <ipc/irq.h> 44 44 #include <ipc/ipcrsc.h> 45 #include <ipc/ipc_kbox.h> 46 #include <udebug/udebug_ipc.h> 45 47 #include <arch/interrupt.h> 46 48 #include <print.h> … … 296 298 * 297 299 * @param call Call structure with the request. 300 * @param phone Phone that the call will be sent through. 298 301 * 299 302 * @return Return 0 on success, ELIMIT or EPERM on error. 300 303 */ 301 static int request_preprocess(call_t *call )304 static int request_preprocess(call_t *call, phone_t *phone) 302 305 { 303 306 int newphid; … … 341 344 } 342 345 break; 346 #ifdef CONFIG_UDEBUG 347 case IPC_M_DEBUG_ALL: 348 return udebug_request_preprocess(call, phone); 349 #endif 343 350 default: 344 351 break; … … 370 377 if (call->buffer) { 371 378 /* This must be an affirmative answer to IPC_M_DATA_READ. */ 379 /* or IPC_M_DEBUG_ALL/UDEBUG_M_MEM_READ... */ 372 380 uintptr_t dst = IPC_GET_ARG1(call->data); 373 381 size_t size = IPC_GET_ARG2(call->data); … … 400 408 } 401 409 IPC_SET_ARG5(call->data, phoneid); 402 } 410 } 411 switch (IPC_GET_METHOD(call->data)) { 412 case IPC_M_DEBUG_ALL: 413 return -1; 414 default: 415 break; 416 } 403 417 return 0; 404 418 } … … 442 456 IPC_SET_ARG5(call.data, 0); 443 457 444 if (!(res = request_preprocess(&call ))) {458 if (!(res = request_preprocess(&call, phone))) { 445 459 rc = ipc_call_sync(phone, &call); 446 460 if (rc != EOK) … … 482 496 GET_CHECK_PHONE(phone, phoneid, return ENOENT); 483 497 484 if (!(res = request_preprocess(&call ))) {498 if (!(res = request_preprocess(&call, phone))) { 485 499 rc = ipc_call_sync(phone, &call); 486 500 if (rc != EOK) … … 551 565 IPC_SET_ARG5(call->data, 0); 552 566 553 if (!(res = request_preprocess(call )))567 if (!(res = request_preprocess(call, phone))) 554 568 ipc_call(phone, call); 555 569 else … … 585 599 return (unative_t) rc; 586 600 } 587 if (!(res = request_preprocess(call )))601 if (!(res = request_preprocess(call, phone))) 588 602 ipc_call(phone, call); 589 603 else … … 869 883 } 870 884 885 #include <console/console.h> 886 887 /** 888 * Syscall connect to a task by id. 889 * 890 * @return Phone id on success, or negative error code. 891 */ 892 unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg) 893 { 894 #ifdef CONFIG_UDEBUG 895 sysarg64_t taskid_arg; 896 int rc; 897 898 rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t)); 899 if (rc != 0) 900 return (unative_t) rc; 901 902 printf("sys_ipc_connect_kbox(%lld, %d)\n", taskid_arg.value); 903 904 return ipc_connect_kbox(taskid_arg.value); 905 #else 906 return (unative_t) ENOTSUP; 907 #endif 908 } 909 871 910 /** @} 872 911 */
Note:
See TracChangeset
for help on using the changeset viewer.