Changes in kernel/generic/src/ipc/sysipc.c [0016674:9233e9d] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
r0016674 r9233e9d 897 897 } 898 898 899 /** Syscall connect to a task by ID 900 * 901 * @return Error code. 902 * 903 */ 904 sysarg_t sys_ipc_connect_kbox(task_id_t *uspace_taskid, cap_handle_t *uspace_phone) 899 #ifdef __32_BITS__ 900 901 /** Syscall connect to a task by ID (32 bits) 902 * 903 * @return Phone id on success, or negative error code. 904 * 905 */ 906 sysarg_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid) 905 907 { 906 908 #ifdef CONFIG_UDEBUG 907 task_id_t taskid; 908 cap_handle_t phone; 909 910 int rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(task_id_t)); 911 if (rc == EOK) { 912 rc = ipc_connect_kbox((task_id_t) taskid, &phone); 913 } 914 915 if (rc == EOK) { 916 rc = copy_to_uspace(uspace_phone, &phone, sizeof(cap_handle_t)); 917 if (rc != EOK) { 918 // Clean up the phone on failure. 919 sys_ipc_hangup(phone); 920 } 921 } 922 923 return (sysarg_t) rc; 909 sysarg64_t taskid; 910 int rc = copy_from_uspace(&taskid, uspace_taskid, sizeof(sysarg64_t)); 911 if (rc != 0) 912 return (sysarg_t) rc; 913 914 return ipc_connect_kbox((task_id_t) taskid); 924 915 #else 925 916 return (sysarg_t) ENOTSUP; … … 927 918 } 928 919 920 #endif /* __32_BITS__ */ 921 922 #ifdef __64_BITS__ 923 924 /** Syscall connect to a task by ID (64 bits) 925 * 926 * @return Phone id on success, or negative error code. 927 * 928 */ 929 sysarg_t sys_ipc_connect_kbox(sysarg_t taskid) 930 { 931 #ifdef CONFIG_UDEBUG 932 return ipc_connect_kbox((task_id_t) taskid); 933 #else 934 return (sysarg_t) ENOTSUP; 935 #endif 936 } 937 938 #endif /* __64_BITS__ */ 939 929 940 /** @} 930 941 */
Note:
See TracChangeset
for help on using the changeset viewer.