Changeset fafb8e5 in mainline for uspace/lib/c/generic/async
- Timestamp:
- 2019-02-06T13:25:12Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 95a47b0
- Parents:
- eb13ef8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-02 14:10:59)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-06 13:25:12)
- Location:
- uspace/lib/c/generic/async
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/client.c
reb13ef8 rfafb8e5 216 216 fibril_rmutex_lock(&message_mutex); 217 217 218 msg->retval = IPC_GET_RETVAL(data);218 msg->retval = ipc_get_retval(data); 219 219 220 220 /* Copy data inside lock, just in case the call was detached */ … … 486 486 487 487 if (r1) 488 *r1 = IPC_GET_ARG1(&result);488 *r1 = ipc_get_arg1(&result); 489 489 490 490 if (r2) 491 *r2 = IPC_GET_ARG2(&result);491 *r2 = ipc_get_arg2(&result); 492 492 493 493 if (r3) 494 *r3 = IPC_GET_ARG3(&result);494 *r3 = ipc_get_arg3(&result); 495 495 496 496 if (r4) 497 *r4 = IPC_GET_ARG4(&result);497 *r4 = ipc_get_arg4(&result); 498 498 499 499 if (r5) 500 *r5 = IPC_GET_ARG5(&result);500 *r5 = ipc_get_arg5(&result); 501 501 502 502 return rc; … … 538 538 539 539 if (r1) 540 *r1 = IPC_GET_ARG1(&result);540 *r1 = ipc_get_arg1(&result); 541 541 542 542 if (r2) 543 *r2 = IPC_GET_ARG2(&result);543 *r2 = ipc_get_arg2(&result); 544 544 545 545 if (r3) 546 *r3 = IPC_GET_ARG3(&result);546 *r3 = ipc_get_arg3(&result); 547 547 548 548 if (r4) 549 *r4 = IPC_GET_ARG4(&result);549 *r4 = ipc_get_arg4(&result); 550 550 551 551 if (r5) 552 *r5 = IPC_GET_ARG5(&result);552 *r5 = ipc_get_arg5(&result); 553 553 554 554 return rc; … … 805 805 return rc; 806 806 807 *out_phone = (cap_phone_handle_t) IPC_GET_ARG5(&result);807 *out_phone = (cap_phone_handle_t) ipc_get_arg5(&result); 808 808 return EOK; 809 809 } -
uspace/lib/c/generic/async/server.c
reb13ef8 rfafb8e5 546 546 errno_t rc = mpsc_send(conn->msg_channel, call); 547 547 548 if ( IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) {548 if (ipc_get_imethod(call) == IPC_M_PHONE_HUNGUP) { 549 549 /* Close the channel, but let the connection fibril answer. */ 550 550 mpsc_close(conn->msg_channel); … … 657 657 658 658 ht_link_t *link = hash_table_find(¬ification_hash_table, 659 & IPC_GET_IMETHOD(call));659 &ipc_get_imethod(call)); 660 660 if (!link) { 661 661 /* Invalid notification. */ … … 871 871 872 872 memset(call, 0, sizeof(ipc_call_t)); 873 IPC_SET_IMETHOD(call, IPC_M_PHONE_HUNGUP);873 ipc_set_imethod(call, IPC_M_PHONE_HUNGUP); 874 874 call->cap_handle = CAP_NIL; 875 875 } … … 944 944 945 945 /* New connection */ 946 if ( IPC_GET_IMETHOD(call) == IPC_M_CONNECT_ME_TO) {946 if (ipc_get_imethod(call) == IPC_M_CONNECT_ME_TO) { 947 947 connection_t *conn = calloc(1, sizeof(*conn)); 948 948 if (!conn) { … … 951 951 } 952 952 953 iface_t iface = (iface_t) IPC_GET_ARG1(call);953 iface_t iface = (iface_t) ipc_get_arg1(call); 954 954 955 955 // TODO: Currently ignores all ports but the first one. … … 1221 1221 async_get_call(call); 1222 1222 1223 if ( IPC_GET_IMETHOD(call) != IPC_M_SHARE_IN)1223 if (ipc_get_imethod(call) != IPC_M_SHARE_IN) 1224 1224 return false; 1225 1225 1226 *size = (size_t) IPC_GET_ARG1(call);1226 *size = (size_t) ipc_get_arg1(call); 1227 1227 return true; 1228 1228 } … … 1276 1276 async_get_call(call); 1277 1277 1278 if ( IPC_GET_IMETHOD(call) != IPC_M_SHARE_OUT)1278 if (ipc_get_imethod(call) != IPC_M_SHARE_OUT) 1279 1279 return false; 1280 1280 1281 *size = (size_t) IPC_GET_ARG2(call);1282 *flags = (unsigned int) IPC_GET_ARG3(call);1281 *size = (size_t) ipc_get_arg2(call); 1282 *flags = (unsigned int) ipc_get_arg3(call); 1283 1283 return true; 1284 1284 } … … 1329 1329 async_get_call(call); 1330 1330 1331 if ( IPC_GET_IMETHOD(call) != IPC_M_DATA_READ)1331 if (ipc_get_imethod(call) != IPC_M_DATA_READ) 1332 1332 return false; 1333 1333 1334 1334 if (size) 1335 *size = (size_t) IPC_GET_ARG2(call);1335 *size = (size_t) ipc_get_arg2(call); 1336 1336 1337 1337 return true; … … 1488 1488 async_get_call(call); 1489 1489 1490 if ( IPC_GET_IMETHOD(call) != IPC_M_DATA_WRITE)1490 if (ipc_get_imethod(call) != IPC_M_DATA_WRITE) 1491 1491 return false; 1492 1492 1493 1493 if (size) 1494 *size = (size_t) IPC_GET_ARG2(call);1494 *size = (size_t) ipc_get_arg2(call); 1495 1495 1496 1496 return true; … … 1732 1732 async_get_call(&call); 1733 1733 1734 cap_phone_handle_t phandle = (cap_handle_t) IPC_GET_ARG5(&call);1735 1736 if (( IPC_GET_IMETHOD(&call) != IPC_M_CONNECT_TO_ME) ||1734 cap_phone_handle_t phandle = (cap_handle_t) ipc_get_arg5(&call); 1735 1736 if ((ipc_get_imethod(&call) != IPC_M_CONNECT_TO_ME) || 1737 1737 !cap_handle_valid((phandle))) { 1738 1738 async_answer_0(&call, EINVAL); … … 1776 1776 async_sess_t *async_callback_receive_start(exch_mgmt_t mgmt, ipc_call_t *call) 1777 1777 { 1778 cap_phone_handle_t phandle = (cap_handle_t) IPC_GET_ARG5(call);1779 1780 if (( IPC_GET_IMETHOD(call) != IPC_M_CONNECT_TO_ME) ||1778 cap_phone_handle_t phandle = (cap_handle_t) ipc_get_arg5(call); 1779 1780 if ((ipc_get_imethod(call) != IPC_M_CONNECT_TO_ME) || 1781 1781 !cap_handle_valid((phandle))) 1782 1782 return NULL; … … 1803 1803 async_get_call(call); 1804 1804 1805 if ( IPC_GET_IMETHOD(call) != IPC_M_STATE_CHANGE_AUTHORIZE)1805 if (ipc_get_imethod(call) != IPC_M_STATE_CHANGE_AUTHORIZE) 1806 1806 return false; 1807 1807
Note:
See TracChangeset
for help on using the changeset viewer.