Changes in kernel/generic/src/ipc/sysipc.c [eadaeae8:c25a39e] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
readaeae8 rc25a39e 271 271 * 272 272 */ 273 errno_t 274 ipc_req_internal(cap_phone_handle_t handle, ipc_data_t *data, sysarg_t priv) 273 errno_t ipc_req_internal(cap_handle_t handle, ipc_data_t *data, sysarg_t priv) 275 274 { 276 275 kobject_t *kobj = kobject_get(TASK, handle, KOBJECT_TYPE_PHONE); … … 363 362 * 364 363 */ 365 sys_errno_t sys_ipc_call_async_fast( cap_phone_handle_t handle, sysarg_t imethod,364 sys_errno_t sys_ipc_call_async_fast(sysarg_t handle, sysarg_t imethod, 366 365 sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t label) 367 366 { … … 410 409 * 411 410 */ 412 sys_errno_t sys_ipc_call_async_slow( cap_phone_handle_t handle, ipc_data_t *data,411 sys_errno_t sys_ipc_call_async_slow(sysarg_t handle, ipc_data_t *data, 413 412 sysarg_t label) 414 413 { … … 467 466 * 468 467 */ 469 static sys_errno_t sys_ipc_forward_common( cap_call_handle_t chandle,470 cap_phone_handle_t phandle, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2,471 sysarg_t arg 3, sysarg_t arg4, sysarg_t arg5, unsigned int mode, bool slow)468 static sys_errno_t sys_ipc_forward_common(sysarg_t chandle, sysarg_t phandle, 469 sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, 470 sysarg_t arg4, sysarg_t arg5, unsigned int mode, bool slow) 472 471 { 473 472 kobject_t *ckobj = cap_unpublish(TASK, chandle, KOBJECT_TYPE_CALL); … … 507 506 if (method_is_system(IPC_GET_IMETHOD(call->data))) { 508 507 if (IPC_GET_IMETHOD(call->data) == IPC_M_CONNECT_TO_ME) 509 phone_dealloc((cap_phone_handle_t) 510 IPC_GET_ARG5(call->data)); 508 phone_dealloc(IPC_GET_ARG5(call->data)); 511 509 512 510 IPC_SET_ARG1(call->data, imethod); … … 579 577 * 580 578 */ 581 sys_errno_t sys_ipc_forward_fast(cap_call_handle_t chandle, 582 cap_phone_handle_t phandle, sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, 583 unsigned int mode) 579 sys_errno_t sys_ipc_forward_fast(sysarg_t chandle, sysarg_t phandle, 580 sysarg_t imethod, sysarg_t arg1, sysarg_t arg2, unsigned int mode) 584 581 { 585 582 return sys_ipc_forward_common(chandle, phandle, imethod, arg1, arg2, 0, … … 604 601 * 605 602 */ 606 sys_errno_t sys_ipc_forward_slow( cap_call_handle_t chandle,607 cap_phone_handle_t phandle,ipc_data_t *data, unsigned int mode)603 sys_errno_t sys_ipc_forward_slow(sysarg_t chandle, sysarg_t phandle, 604 ipc_data_t *data, unsigned int mode) 608 605 { 609 606 ipc_data_t newdata; … … 634 631 * 635 632 */ 636 sys_errno_t sys_ipc_answer_fast( cap_call_handle_t chandle, sysarg_t retval,637 sysarg_t arg 1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4)633 sys_errno_t sys_ipc_answer_fast(sysarg_t chandle, sysarg_t retval, sysarg_t arg1, 634 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4) 638 635 { 639 636 kobject_t *kobj = cap_unpublish(TASK, chandle, KOBJECT_TYPE_CALL); … … 681 678 * 682 679 */ 683 sys_errno_t sys_ipc_answer_slow( cap_call_handle_t chandle, ipc_data_t *data)680 sys_errno_t sys_ipc_answer_slow(sysarg_t chandle, ipc_data_t *data) 684 681 { 685 682 kobject_t *kobj = cap_unpublish(TASK, chandle, KOBJECT_TYPE_CALL); … … 725 722 * 726 723 */ 727 sys_errno_t sys_ipc_hangup( cap_phone_handle_t handle)724 sys_errno_t sys_ipc_hangup(sysarg_t handle) 728 725 { 729 726 kobject_t *kobj = cap_unpublish(TASK, handle, KOBJECT_TYPE_PHONE); … … 803 800 goto restart; 804 801 805 cap_handle_t handle = CAP_NIL;802 cap_handle_t handle; 806 803 errno_t rc = cap_alloc(TASK, &handle); 807 804 if (rc != EOK) { … … 824 821 825 822 error: 826 if ( CAP_HANDLE_VALID(handle))823 if (handle >= 0) 827 824 cap_free(TASK, handle); 828 825 … … 864 861 * @param ucode Uspace pointer to the top-half pseudocode. 865 862 * 866 * @param[out] uspace_handle Uspace pointer to IRQ capability handle863 * @param[out] uspace_handle Uspace pointer to IRQ kernel object capability 867 864 * 868 865 * @return EPERM … … 870 867 * 871 868 */ 872 sys_errno_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, 873 irq_code_t *ucode, cap_irq_handle_t *uspace_handle)869 sys_errno_t sys_ipc_irq_subscribe(inr_t inr, sysarg_t imethod, irq_code_t *ucode, 870 cap_handle_t *uspace_handle) 874 871 { 875 872 if (!(perm_get(TASK) & PERM_IRQ_REG)) … … 881 878 /** Disconnect an IRQ handler from a task. 882 879 * 883 * @param handle IRQ capability handle. 880 * @param inr IRQ number. 881 * @param devno Device number. 884 882 * 885 883 * @return Zero on success or EPERM on error. 886 884 * 887 885 */ 888 sys_errno_t sys_ipc_irq_unsubscribe( cap_irq_handle_t handle)886 sys_errno_t sys_ipc_irq_unsubscribe(sysarg_t cap) 889 887 { 890 888 if (!(perm_get(TASK) & PERM_IRQ_REG)) 891 889 return EPERM; 892 890 893 ipc_irq_unsubscribe(&TASK->answerbox, handle);891 ipc_irq_unsubscribe(&TASK->answerbox, cap); 894 892 895 893 return 0; … … 901 899 * 902 900 */ 903 sys_errno_t sys_ipc_connect_kbox(task_id_t *uspace_taskid, 904 cap_phone_handle_t *uspace_phone) 901 sys_errno_t sys_ipc_connect_kbox(task_id_t *uspace_taskid, cap_handle_t *uspace_phone) 905 902 { 906 903 #ifdef CONFIG_UDEBUG 907 904 task_id_t taskid; 908 cap_ phone_handle_t phone;905 cap_handle_t phone; 909 906 910 907 errno_t rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(task_id_t));
Note:
See TracChangeset
for help on using the changeset viewer.