Changes in uspace/lib/c/generic/async.c [e35bf88:228e490] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async.c
re35bf88 r228e490 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 { … … 536 536 if (callid) 537 537 ipc_answer_0(callid, ENOMEM); 538 return NULL;538 return (uintptr_t) NULL; 539 539 } 540 540 … … 556 556 if (callid) 557 557 ipc_answer_0(callid, ENOMEM); 558 return NULL;558 return (uintptr_t) NULL; 559 559 } 560 560 … … 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: … … 807 807 * 808 808 */ 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)809 aid_t async_send_fast(int phoneid, sysarg_t method, sysarg_t arg1, 810 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr) 811 811 { 812 812 amsg_t *msg = malloc(sizeof(*msg)); … … 846 846 * 847 847 */ 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,848 aid_t async_send_slow(int phoneid, sysarg_t method, sysarg_t arg1, 849 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, 850 850 ipc_call_t *dataptr) 851 851 { … … 875 875 * 876 876 */ 877 void async_wait_for(aid_t amsgid, ipcarg_t *retval)877 void async_wait_for(aid_t amsgid, sysarg_t *retval) 878 878 { 879 879 amsg_t *msg = (amsg_t *) amsgid; … … 911 911 * 912 912 */ 913 int async_wait_timeout(aid_t amsgid, ipcarg_t *retval, suseconds_t timeout)913 int async_wait_timeout(aid_t amsgid, sysarg_t *retval, suseconds_t timeout) 914 914 { 915 915 amsg_t *msg = (amsg_t *) amsgid; … … 1023 1023 * 1024 1024 */ 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)1025 sysarg_t async_req_fast(int phoneid, sysarg_t method, sysarg_t arg1, 1026 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t *r1, sysarg_t *r2, 1027 sysarg_t *r3, sysarg_t *r4, sysarg_t *r5) 1028 1028 { 1029 1029 ipc_call_t result; … … 1031 1031 &result); 1032 1032 1033 ipcarg_t rc;1033 sysarg_t rc; 1034 1034 async_wait_for(eid, &rc); 1035 1035 … … 1072 1072 * 1073 1073 */ 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)1074 sysarg_t async_req_slow(int phoneid, sysarg_t method, sysarg_t arg1, 1075 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, sysarg_t arg5, sysarg_t *r1, 1076 sysarg_t *r2, sysarg_t *r3, sysarg_t *r4, sysarg_t *r5) 1077 1077 { 1078 1078 ipc_call_t result; … … 1080 1080 &result); 1081 1081 1082 ipcarg_t rc;1082 sysarg_t rc; 1083 1083 async_wait_for(eid, &rc); 1084 1084 … … 1113 1113 */ 1114 1114 int 1115 async_connect_me_to(int phoneid, ipcarg_t arg1, ipcarg_t arg2, ipcarg_t arg3)1115 async_connect_me_to(int phoneid, sysarg_t arg1, sysarg_t arg2, sysarg_t arg3) 1116 1116 { 1117 1117 int rc; 1118 ipcarg_t newphid;1118 sysarg_t newphid; 1119 1119 1120 1120 rc = async_req_3_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, NULL, … … 1140 1140 */ 1141 1141 int 1142 async_connect_me_to_blocking(int phoneid, ipcarg_t arg1, ipcarg_t arg2,1143 ipcarg_t arg3)1142 async_connect_me_to_blocking(int phoneid, sysarg_t arg1, sysarg_t arg2, 1143 sysarg_t arg3) 1144 1144 { 1145 1145 int rc; 1146 ipcarg_t newphid;1146 sysarg_t newphid; 1147 1147 1148 1148 rc = async_req_4_5(phoneid, IPC_M_CONNECT_ME_TO, arg1, arg2, arg3, … … 1166 1166 * @return Zero on success or a negative error code from errno.h. 1167 1167 */ 1168 int async_share_in_start(int phoneid, void *dst, size_t size, ipcarg_t arg,1168 int async_share_in_start(int phoneid, void *dst, size_t size, sysarg_t arg, 1169 1169 int *flags) 1170 1170 { 1171 1171 int res; 1172 1172 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);1173 res = async_req_3_2(phoneid, IPC_M_SHARE_IN, (sysarg_t) dst, 1174 (sysarg_t) size, arg, NULL, &tmp_flags); 1175 1175 if (flags) 1176 1176 *flags = tmp_flags; … … 1199 1199 1200 1200 *callid = async_get_call(&data); 1201 if (IPC_GET_ METHOD(data) != IPC_M_SHARE_IN)1201 if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_IN) 1202 1202 return 0; 1203 1203 *size = (size_t) IPC_GET_ARG2(data); … … 1231 1231 int async_share_out_start(int phoneid, void *src, int flags) 1232 1232 { 1233 return async_req_3_0(phoneid, IPC_M_SHARE_OUT, ( ipcarg_t) src, 0,1234 ( ipcarg_t) flags);1233 return async_req_3_0(phoneid, IPC_M_SHARE_OUT, (sysarg_t) src, 0, 1234 (sysarg_t) flags); 1235 1235 } 1236 1236 … … 1259 1259 1260 1260 *callid = async_get_call(&data); 1261 if (IPC_GET_ METHOD(data) != IPC_M_SHARE_OUT)1261 if (IPC_GET_IMETHOD(data) != IPC_M_SHARE_OUT) 1262 1262 return 0; 1263 1263 *size = (size_t) IPC_GET_ARG2(data); … … 1292 1292 int async_data_read_start(int phoneid, void *dst, size_t size) 1293 1293 { 1294 return async_req_2_0(phoneid, IPC_M_DATA_READ, ( ipcarg_t) dst,1295 ( ipcarg_t) size);1294 return async_req_2_0(phoneid, IPC_M_DATA_READ, (sysarg_t) dst, 1295 (sysarg_t) size); 1296 1296 } 1297 1297 … … 1317 1317 1318 1318 *callid = async_get_call(&data); 1319 if (IPC_GET_ METHOD(data) != IPC_M_DATA_READ)1319 if (IPC_GET_IMETHOD(data) != IPC_M_DATA_READ) 1320 1320 return 0; 1321 1321 if (size) … … 1345 1345 * 1346 1346 */ 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)1347 int async_data_read_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1, 1348 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr) 1349 1349 { 1350 1350 ipc_callid_t callid; … … 1369 1369 } 1370 1370 1371 ipcarg_t rc;1371 sysarg_t rc; 1372 1372 async_wait_for(msg, &rc); 1373 1373 … … 1386 1386 int async_data_write_start(int phoneid, const void *src, size_t size) 1387 1387 { 1388 return async_req_2_0(phoneid, IPC_M_DATA_WRITE, ( ipcarg_t) src,1389 ( ipcarg_t) size);1388 return async_req_2_0(phoneid, IPC_M_DATA_WRITE, (sysarg_t) src, 1389 (sysarg_t) size); 1390 1390 } 1391 1391 … … 1412 1412 1413 1413 *callid = async_get_call(&data); 1414 if (IPC_GET_ METHOD(data) != IPC_M_DATA_WRITE)1414 if (IPC_GET_IMETHOD(data) != IPC_M_DATA_WRITE) 1415 1415 return 0; 1416 1416 … … 1531 1531 * 1532 1532 */ 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)1533 int async_data_write_forward_fast(int phoneid, sysarg_t method, sysarg_t arg1, 1534 sysarg_t arg2, sysarg_t arg3, sysarg_t arg4, ipc_call_t *dataptr) 1535 1535 { 1536 1536 ipc_callid_t callid; … … 1555 1555 } 1556 1556 1557 ipcarg_t rc;1557 sysarg_t rc; 1558 1558 async_wait_for(msg, &rc); 1559 1559
Note:
See TracChangeset
for help on using the changeset viewer.