Changes in uspace/lib/c/generic/async.c [0b4a67a:c1c0184] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
r0b4a67a rc1c0184 120 120 ipc_call_t *dataptr; 121 121 122 ipcarg_t retval;122 sysarg_t retval; 123 123 } amsg_t; 124 124 … … 140 140 141 141 /** Incoming phone hash. */ 142 ipcarg_t in_phone_hash;142 sysarg_t in_phone_hash; 143 143 144 144 /** Messages that should be delivered to this fibril. */ … … 288 288 list_append(&msg->link, &conn->msg_queue); 289 289 290 if (IPC_GET_ METHOD(*call) == IPC_M_PHONE_HUNGUP)290 if (IPC_GET_IMETHOD(*call) == IPC_M_PHONE_HUNGUP) 291 291 conn->close_callid = callid; 292 292 … … 401 401 */ 402 402 memset(call, 0, sizeof(ipc_call_t)); 403 IPC_SET_ METHOD(*call, IPC_M_PHONE_HUNGUP);403 IPC_SET_IMETHOD(*call, IPC_M_PHONE_HUNGUP); 404 404 futex_up(&async_futex); 405 405 return conn->close_callid; … … 529 529 * 530 530 */ 531 fid_t async_new_connection( ipcarg_t in_phone_hash, ipc_callid_t callid,531 fid_t async_new_connection(sysarg_t in_phone_hash, ipc_callid_t callid, 532 532 ipc_call_t *call, void (*cfibril)(ipc_callid_t, ipc_call_t *)) 533 533 { … … 588 588 } 589 589 590 switch (IPC_GET_ METHOD(*call)) {590 switch (IPC_GET_IMETHOD(*call)) { 591 591 case IPC_M_CONNECT_ME: 592 592 case IPC_M_CONNECT_ME_TO: … … 749 749 return ENOMEM; 750 750 } 751 752 _async_sess_init(); 751 753 752 754 return 0; … … 807 809 * 808 810 */ 809 aid_t async_send_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,810 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)811 aid_t async_send_fast(int phoneid, sysarg_t method, sysarg_t arg1, 812 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr) 811 813 { 812 814 amsg_t *msg = malloc(sizeof(*msg)); … … 846 848 * 847 849 */ 848 aid_t async_send_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,849 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5,850 aid_t async_send_slow(int phoneid, sysarg_t method, sysarg_t arg1, 851 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, 850 852 ipc_call_t *dataptr) 851 853 { … … 875 877 * 876 878 */ 877 void async_wait_for(aid_t amsgid, ipcarg_t *retval)879 void async_wait_for(aid_t amsgid, sysarg_t *retval) 878 880 { 879 881 amsg_t *msg = (amsg_t *) amsgid; … … 911 913 * 912 914 */ 913 int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout)915 int async_wait_timeout(aid_t amsgid, sysarg_t *retval, suseconds_t timeout) 914 916 { 915 917 amsg_t *msg = (amsg_t *) amsgid; … … 1023 1025 * 1024 1026 */ 1025 ipcarg_t async_req_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,1026 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t *r1, ipcarg_t *r2,1027 ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)1027 sysarg_t async_req_fast(int phoneid, sysarg_t method, sysarg_t arg1, 1028 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2, 1029 sysarg_t *r3, sysarg_t *r4, sysarg_t *r5) 1028 1030 { 1029 1031 ipc_call_t result; … … 1031 1033 &result); 1032 1034 1033 ipcarg_t rc;1035 sysarg_t rc; 1034 1036 async_wait_for(eid, &rc); 1035 1037 … … 1072 1074 * 1073 1075 */ 1074 ipcarg_t async_req_slow(int phoneid, ipcarg_t method, ipcarg_t arg1,1075 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipcarg_t arg5, ipcarg_t *r1,1076 ipcarg_t *r2, ipcarg_t *r3, ipcarg_t *r4, ipcarg_t *r5)1076 sysarg_t async_req_slow(int phoneid, sysarg_t method, sysarg_t arg1, 1077 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1, 1078 sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5) 1077 1079 { 1078 1080 ipc_call_t result; … … 1080 1082 &result); 1081 1083 1082 ipcarg_t rc;1084 sysarg_t rc; 1083 1085 async_wait_for(eid, &rc); 1084 1086 … … 1113 1115 */ 1114 1116 int 1115 async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)1117 async_connect_me_to(int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3) 1116 1118 { 1117 1119 int rc; 1118 ipcarg_t newphid;1120 sysarg_t newphid; 1119 1121 1120 1122 rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL, … … 1140 1142 */ 1141 1143 int 1142 async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,1143 ipcarg_t arg3)1144 async_connect_me_to_blocking(int phoneid, sysarg_t arg1, sysarg_t arg2, 1145 sysarg_t arg3) 1144 1146 { 1145 1147 int rc; 1146 ipcarg_t newphid;1148 sysarg_t newphid; 1147 1149 1148 1150 rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, … … 1166 1168 * @return Zero on success or a negative error code from errno.h. 1167 1169 */ 1168 int async_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,1170 int async_share_in_start(int phoneid, void *dst, size_t size, sysarg_t arg, 1169 1171 int *flags) 1170 1172 { 1171 1173 int res; 1172 1174 sysarg_t tmp_flags; 1173 res = async_req_3_2(phoneid, IPC_M_SHARE_IN, ( ipcarg_t) dst,1174 ( ipcarg_t) size, arg, NULL, &tmp_flags);1175 res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (sysarg_t) dst, 1176 (sysarg_t) size, arg, NULL, &tmp_flags); 1175 1177 if (flags) 1176 1178 *flags = tmp_flags; … … 1199 1201 1200 1202 *callid = async_get_call(&data); 1201 if (IPC_GET_ METHOD(data) != IPC_M_SHARE_IN)1203 if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_IN) 1202 1204 return 0; 1203 1205 *size = (size_t) IPC_GET_ARG2(data); … … 1231 1233 int async_share_out_start(int phoneid, void *src, int flags) 1232 1234 { 1233 return async_req_3_0(phoneid, IPC_M_SHARE_OUT, ( ipcarg_t) src, 0,1234 ( ipcarg_t) flags);1235 return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (sysarg_t) src, 0, 1236 (sysarg_t) flags); 1235 1237 } 1236 1238 … … 1259 1261 1260 1262 *callid = async_get_call(&data); 1261 if (IPC_GET_ METHOD(data) != IPC_M_SHARE_OUT)1263 if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_OUT) 1262 1264 return 0; 1263 1265 *size = (size_t) IPC_GET_ARG2(data); … … 1292 1294 int async_data_read_start(int phoneid, void *dst, size_t size) 1293 1295 { 1294 return async_req_2_0(phoneid, IPC_M_DATA_READ, ( ipcarg_t) dst,1295 ( ipcarg_t) size);1296 return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst, 1297 (sysarg_t) size); 1296 1298 } 1297 1299 … … 1317 1319 1318 1320 *callid = async_get_call(&data); 1319 if (IPC_GET_ METHOD(data) != IPC_M_DATA_READ)1321 if (IPC_GET_IMETHOD(data) != IPC_M_DATA_READ) 1320 1322 return 0; 1321 1323 if (size) … … 1345 1347 * 1346 1348 */ 1347 int async_data_read_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,1348 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)1349 int async_data_read_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1, 1350 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr) 1349 1351 { 1350 1352 ipc_callid_t callid; … … 1369 1371 } 1370 1372 1371 ipcarg_t rc;1373 sysarg_t rc; 1372 1374 async_wait_for(msg, &rc); 1373 1375 … … 1386 1388 int async_data_write_start(int phoneid, const void *src, size_t size) 1387 1389 { 1388 return async_req_2_0(phoneid, IPC_M_DATA_WRITE, ( ipcarg_t) src,1389 ( ipcarg_t) size);1390 return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src, 1391 (sysarg_t) size); 1390 1392 } 1391 1393 … … 1412 1414 1413 1415 *callid = async_get_call(&data); 1414 if (IPC_GET_ METHOD(data) != IPC_M_DATA_WRITE)1416 if (IPC_GET_IMETHOD(data) != IPC_M_DATA_WRITE) 1415 1417 return 0; 1416 1418 … … 1531 1533 * 1532 1534 */ 1533 int async_data_write_forward_fast(int phoneid, ipcarg_t method, ipcarg_t arg1,1534 ipcarg_t arg2, ipcarg_t arg3, ipcarg_t arg4, ipc_call_t *dataptr)1535 int async_data_write_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1, 1536 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr) 1535 1537 { 1536 1538 ipc_callid_t callid; … … 1555 1557 } 1556 1558 1557 ipcarg_t rc;1559 sysarg_t rc; 1558 1560 async_wait_for(msg, &rc); 1559 1561
Note:
See TracChangeset
for help on using the changeset viewer.