Changeset d054ad3 in mainline for uspace/lib/c/generic/async/client.c
- Timestamp:
- 2018-07-09T18:36:33Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2d56e2e
- Parents:
- 87337dc5
- git-author:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-05 16:39:15)
- git-committer:
- Jiří Zárevúcky <jiri.zarevucky@…> (2018-07-09 18:36:33)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/c/generic/async/client.c
r87337dc5 rd054ad3 241 241 * 242 242 */ 243 static void reply_received(void *arg, errno_t retval, ipc_call_t *data) 244 { 245 assert(arg); 243 void async_reply_received(ipc_call_t *data) 244 { 245 amsg_t *msg = data->label; 246 if (!msg) 247 return; 246 248 247 249 futex_lock(&async_futex); 248 250 249 amsg_t *msg = (amsg_t *) arg; 250 msg->retval = retval; 251 msg->retval = IPC_GET_RETVAL(*data); 251 252 252 253 /* Copy data after futex_down, just in case the call was detached */ … … 302 303 msg->wdata.active = true; 303 304 304 ipc_call_async_4(exch->phone, imethod, arg1, arg2, arg3, arg4, msg, 305 reply_received); 305 errno_t rc = ipc_call_async_4(exch->phone, imethod, arg1, arg2, arg3, 306 arg4, msg); 307 if (rc != EOK) { 308 msg->retval = rc; 309 msg->done = true; 310 } 306 311 307 312 return (aid_t) msg; … … 340 345 msg->wdata.active = true; 341 346 342 ipc_call_async_5(exch->phone, imethod, arg1, arg2, arg3, arg4, arg5, 343 msg, reply_received); 347 errno_t rc = ipc_call_async_5(exch->phone, imethod, arg1, arg2, arg3, 348 arg4, arg5, msg); 349 if (rc != EOK) { 350 msg->retval = rc; 351 msg->done = true; 352 } 344 353 345 354 return (aid_t) msg; … … 653 662 { 654 663 if (exch != NULL) 655 ipc_call_async_0(exch->phone, imethod, NULL , NULL);664 ipc_call_async_0(exch->phone, imethod, NULL); 656 665 } 657 666 … … 659 668 { 660 669 if (exch != NULL) 661 ipc_call_async_1(exch->phone, imethod, arg1, NULL , NULL);670 ipc_call_async_1(exch->phone, imethod, arg1, NULL); 662 671 } 663 672 … … 666 675 { 667 676 if (exch != NULL) 668 ipc_call_async_2(exch->phone, imethod, arg1, arg2, NULL , NULL);677 ipc_call_async_2(exch->phone, imethod, arg1, arg2, NULL); 669 678 } 670 679 … … 673 682 { 674 683 if (exch != NULL) 675 ipc_call_async_3(exch->phone, imethod, arg1, arg2, arg3, NULL, 676 NULL); 684 ipc_call_async_3(exch->phone, imethod, arg1, arg2, arg3, NULL); 677 685 } 678 686 … … 682 690 if (exch != NULL) 683 691 ipc_call_async_4(exch->phone, imethod, arg1, arg2, arg3, arg4, 684 NULL , NULL);692 NULL); 685 693 } 686 694 … … 690 698 if (exch != NULL) 691 699 ipc_call_async_5(exch->phone, imethod, arg1, arg2, arg3, arg4, 692 arg5, NULL , NULL);700 arg5, NULL); 693 701 } 694 702 … … 710 718 msg->wdata.active = true; 711 719 712 ipc_call_async_4(phone, IPC_M_CONNECT_ME_TO, (sysarg_t) iface, arg2, 713 arg3, flags, msg, reply_received); 714 715 errno_t rc; 720 errno_t rc = ipc_call_async_4(phone, IPC_M_CONNECT_ME_TO, 721 (sysarg_t) iface, arg2, arg3, flags, msg); 722 if (rc != EOK) { 723 msg->retval = rc; 724 msg->done = true; 725 } 726 716 727 async_wait_for((aid_t) msg, &rc); 717 728
Note:
See TracChangeset
for help on using the changeset viewer.