Changeset 96b02eb9 in mainline for kernel/generic/src/ipc/sysipc.c
- Timestamp:
- 2010-12-14T12:52:38Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6b10dab
- Parents:
- 554debd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ipc/sysipc.c
r554debd r96b02eb9 68 68 * 69 69 */ 70 static int phone_get( unative_t phoneid, phone_t **phone)70 static int phone_get(sysarg_t phoneid, phone_t **phone) 71 71 { 72 72 if (phoneid >= IPC_MAX_PHONES) … … 84 84 * 85 85 */ 86 static inline bool method_is_system( unative_t method)86 static inline bool method_is_system(sysarg_t method) 87 87 { 88 88 if (method <= IPC_M_LAST_SYSTEM) … … 102 102 * 103 103 */ 104 static inline bool method_is_forwardable( unative_t method)104 static inline bool method_is_forwardable(sysarg_t method) 105 105 { 106 106 switch (method) { … … 124 124 * 125 125 */ 126 static inline bool method_is_immutable( unative_t method)126 static inline bool method_is_immutable(sysarg_t method) 127 127 { 128 128 switch (method) { … … 248 248 /* Set 'phone hash' as arg5 of response */ 249 249 IPC_SET_ARG5(answer->data, 250 ( unative_t) &TASK->phones[phoneid]);250 (sysarg_t) &TASK->phones[phoneid]); 251 251 } 252 252 } else if (IPC_GET_METHOD(*olddata) == IPC_M_CONNECT_ME_TO) { … … 399 399 } 400 400 case IPC_M_CONNECT_ME: 401 IPC_SET_ARG5(call->data, ( unative_t) phone);401 IPC_SET_ARG5(call->data, (sysarg_t) phone); 402 402 break; 403 403 case IPC_M_CONNECT_ME_TO: { … … 407 407 408 408 /* Set arg5 for server */ 409 IPC_SET_ARG5(call->data, ( unative_t) &TASK->phones[newphid]);409 IPC_SET_ARG5(call->data, (sysarg_t) &TASK->phones[newphid]); 410 410 call->flags |= IPC_CALL_CONN_ME_TO; 411 411 call->priv = newphid; … … 541 541 * 542 542 */ 543 unative_t sys_ipc_call_sync_fast(unative_t phoneid, unative_t method,544 unative_t arg1, unative_t arg2, unative_t arg3, ipc_data_t *data)543 sysarg_t sys_ipc_call_sync_fast(sysarg_t phoneid, sysarg_t method, 544 sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, ipc_data_t *data) 545 545 { 546 546 phone_t *phone; … … 601 601 * 602 602 */ 603 unative_t sys_ipc_call_sync_slow(unative_t phoneid, ipc_data_t *question,603 sysarg_t sys_ipc_call_sync_slow(sysarg_t phoneid, ipc_data_t *question, 604 604 ipc_data_t *reply) 605 605 { … … 613 613 if (rc != 0) { 614 614 ipc_call_free(call); 615 return ( unative_t) rc;615 return (sysarg_t) rc; 616 616 } 617 617 … … 677 677 * 678 678 */ 679 unative_t sys_ipc_call_async_fast(unative_t phoneid, unative_t method,680 unative_t arg1, unative_t arg2, unative_t arg3, unative_t arg4)679 sysarg_t sys_ipc_call_async_fast(sysarg_t phoneid, sysarg_t method, 680 sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4) 681 681 { 682 682 phone_t *phone; … … 707 707 ipc_backsend_err(phone, call, res); 708 708 709 return ( unative_t) call;709 return (sysarg_t) call; 710 710 } 711 711 … … 718 718 * 719 719 */ 720 unative_t sys_ipc_call_async_slow(unative_t phoneid, ipc_data_t *data)720 sysarg_t sys_ipc_call_async_slow(sysarg_t phoneid, ipc_data_t *data) 721 721 { 722 722 phone_t *phone; … … 732 732 if (rc != 0) { 733 733 ipc_call_free(call); 734 return ( unative_t) rc;734 return (sysarg_t) rc; 735 735 } 736 736 … … 742 742 ipc_backsend_err(phone, call, res); 743 743 744 return ( unative_t) call;744 return (sysarg_t) call; 745 745 } 746 746 … … 767 767 * 768 768 */ 769 static unative_t sys_ipc_forward_common(unative_t callid, unative_t phoneid,770 unative_t method, unative_t arg1, unative_t arg2, unative_t arg3,771 unative_t arg4, unative_t arg5, unsigned int mode, bool slow)769 static sysarg_t sys_ipc_forward_common(sysarg_t callid, sysarg_t phoneid, 770 sysarg_t method, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, 771 sysarg_t arg4, sysarg_t arg5, unsigned int mode, bool slow) 772 772 { 773 773 call_t *call = get_call(callid); … … 846 846 * 847 847 */ 848 unative_t sys_ipc_forward_fast(unative_t callid, unative_t phoneid,849 unative_t method, unative_t arg1, unative_t arg2, unsigned int mode)848 sysarg_t sys_ipc_forward_fast(sysarg_t callid, sysarg_t phoneid, 849 sysarg_t method, sysarg_t arg1, sysarg_t arg2, unsigned int mode) 850 850 { 851 851 return sys_ipc_forward_common(callid, phoneid, method, arg1, arg2, 0, 0, … … 870 870 * 871 871 */ 872 unative_t sys_ipc_forward_slow(unative_t callid, unative_t phoneid,872 sysarg_t sys_ipc_forward_slow(sysarg_t callid, sysarg_t phoneid, 873 873 ipc_data_t *data, unsigned int mode) 874 874 { … … 877 877 sizeof(newdata.args)); 878 878 if (rc != 0) 879 return ( unative_t) rc;879 return (sysarg_t) rc; 880 880 881 881 return sys_ipc_forward_common(callid, phoneid, … … 900 900 * 901 901 */ 902 unative_t sys_ipc_answer_fast(unative_t callid, unative_t retval,903 unative_t arg1, unative_t arg2, unative_t arg3, unative_t arg4)902 sysarg_t sys_ipc_answer_fast(sysarg_t callid, sysarg_t retval, 903 sysarg_t arg1, sysarg_t arg2, sysarg_t arg3, sysarg_t arg4) 904 904 { 905 905 /* Do not answer notification callids */ … … 945 945 * 946 946 */ 947 unative_t sys_ipc_answer_slow(unative_t callid, ipc_data_t *data)947 sysarg_t sys_ipc_answer_slow(sysarg_t callid, ipc_data_t *data) 948 948 { 949 949 /* Do not answer notification callids */ … … 982 982 * 983 983 */ 984 unative_t sys_ipc_hangup(unative_t phoneid)984 sysarg_t sys_ipc_hangup(sysarg_t phoneid) 985 985 { 986 986 phone_t *phone; … … 1008 1008 * 1009 1009 */ 1010 unative_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec,1010 sysarg_t sys_ipc_wait_for_call(ipc_data_t *calldata, uint32_t usec, 1011 1011 unsigned int flags) 1012 1012 { … … 1037 1037 ipc_call_free(call); 1038 1038 1039 return (( unative_t) call) | IPC_CALLID_NOTIFICATION;1039 return ((sysarg_t) call) | IPC_CALLID_NOTIFICATION; 1040 1040 } 1041 1041 … … 1051 1051 ipc_call_free(call); 1052 1052 1053 return (( unative_t) call) | IPC_CALLID_ANSWERED;1053 return ((sysarg_t) call) | IPC_CALLID_ANSWERED; 1054 1054 } 1055 1055 … … 1079 1079 } 1080 1080 1081 return ( unative_t) call;1081 return (sysarg_t) call; 1082 1082 } 1083 1083 … … 1085 1085 * 1086 1086 */ 1087 unative_t sys_ipc_poke(void)1087 sysarg_t sys_ipc_poke(void) 1088 1088 { 1089 1089 waitq_unsleep(&TASK->answerbox.wq); … … 1101 1101 * 1102 1102 */ 1103 unative_t sys_ipc_register_irq(inr_t inr, devno_t devno, unative_t method,1103 sysarg_t sys_ipc_register_irq(inr_t inr, devno_t devno, sysarg_t method, 1104 1104 irq_code_t *ucode) 1105 1105 { … … 1118 1118 * 1119 1119 */ 1120 unative_t sys_ipc_unregister_irq(inr_t inr, devno_t devno)1120 sysarg_t sys_ipc_unregister_irq(inr_t inr, devno_t devno) 1121 1121 { 1122 1122 if (!(cap_get(TASK) & CAP_IRQ_REG)) … … 1135 1135 * 1136 1136 */ 1137 unative_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg)1137 sysarg_t sys_ipc_connect_kbox(sysarg64_t *uspace_taskid_arg) 1138 1138 { 1139 1139 #ifdef CONFIG_UDEBUG … … 1141 1141 int rc = copy_from_uspace(&taskid_arg, uspace_taskid_arg, sizeof(sysarg64_t)); 1142 1142 if (rc != 0) 1143 return ( unative_t) rc;1143 return (sysarg_t) rc; 1144 1144 1145 1145 LOG("sys_ipc_connect_kbox(%" PRIu64 ")", taskid_arg.value); … … 1147 1147 return ipc_connect_kbox(taskid_arg.value); 1148 1148 #else 1149 return ( unative_t) ENOTSUP;1149 return (sysarg_t) ENOTSUP; 1150 1150 #endif 1151 1151 }
Note:
See TracChangeset
for help on using the changeset viewer.