Changeset fafb8e5 in mainline for uspace/lib/c
- 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
- Files:
-
- 28 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 -
uspace/lib/c/generic/bd.c
reb13ef8 rfafb8e5 206 206 async_get_call(&call); 207 207 208 if (! IPC_GET_IMETHOD(&call)) {208 if (!ipc_get_imethod(&call)) { 209 209 async_answer_0(&call, EOK); 210 210 return; 211 211 } 212 212 213 switch ( IPC_GET_IMETHOD(&call)) {213 switch (ipc_get_imethod(&call)) { 214 214 default: 215 215 async_answer_0(&call, ENOTSUP); -
uspace/lib/c/generic/bd_srv.c
reb13ef8 rfafb8e5 51 51 errno_t rc; 52 52 53 ba = MERGE_LOUP32( IPC_GET_ARG1(call), IPC_GET_ARG2(call));54 cnt = IPC_GET_ARG3(call);53 ba = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call)); 54 cnt = ipc_get_arg3(call); 55 55 56 56 ipc_call_t rcall; … … 95 95 errno_t rc; 96 96 97 session = IPC_GET_ARG1(call);97 session = ipc_get_arg1(call); 98 98 99 99 ipc_call_t rcall; … … 137 137 errno_t rc; 138 138 139 ba = MERGE_LOUP32( IPC_GET_ARG1(call), IPC_GET_ARG2(call));140 cnt = IPC_GET_ARG3(call);139 ba = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call)); 140 cnt = ipc_get_arg3(call); 141 141 142 142 if (srv->srvs->ops->sync_cache == NULL) { … … 157 157 errno_t rc; 158 158 159 ba = MERGE_LOUP32( IPC_GET_ARG1(call), IPC_GET_ARG2(call));160 cnt = IPC_GET_ARG3(call);159 ba = MERGE_LOUP32(ipc_get_arg1(call), ipc_get_arg2(call)); 160 cnt = ipc_get_arg3(call); 161 161 162 162 rc = async_data_write_accept(&data, false, 0, 0, 0, &size); … … 247 247 ipc_call_t call; 248 248 async_get_call(&call); 249 sysarg_t method = IPC_GET_IMETHOD(&call);249 sysarg_t method = ipc_get_imethod(&call); 250 250 251 251 if (!method) { -
uspace/lib/c/generic/devman.c
reb13ef8 rfafb8e5 255 255 if (retval == EOK) { 256 256 if (funh != NULL) 257 *funh = (int) IPC_GET_ARG1(&answer);257 *funh = (int) ipc_get_arg1(&answer); 258 258 } else { 259 259 if (funh != NULL) … … 394 394 395 395 if (handle != NULL) 396 *handle = (devman_handle_t) IPC_GET_ARG1(&answer);396 *handle = (devman_handle_t) ipc_get_arg1(&answer); 397 397 398 398 return retval; … … 429 429 430 430 if (r1 != NULL) 431 *r1 = IPC_GET_ARG1(&answer);432 act_size = IPC_GET_ARG2(&dreply);431 *r1 = ipc_get_arg1(&answer); 432 act_size = ipc_get_arg2(&dreply); 433 433 assert(act_size <= buf_size - 1); 434 434 buf[act_size] = '\0'; … … 517 517 } 518 518 519 *act_size = IPC_GET_ARG1(&answer);519 *act_size = ipc_get_arg1(&answer); 520 520 return EOK; 521 521 } … … 663 663 664 664 if (handle != NULL) 665 *handle = (devman_handle_t) IPC_GET_ARG1(&answer);665 *handle = (devman_handle_t) ipc_get_arg1(&answer); 666 666 667 667 return retval; -
uspace/lib/c/generic/dnsr.c
reb13ef8 rfafb8e5 125 125 } 126 126 127 size_t act_size = IPC_GET_ARG2(&answer_cname);127 size_t act_size = ipc_get_arg2(&answer_cname); 128 128 assert(act_size <= DNSR_NAME_MAX_SIZE); 129 129 -
uspace/lib/c/generic/inet.c
reb13ef8 rfafb8e5 180 180 inet_dgram_t dgram; 181 181 182 dgram.tos = IPC_GET_ARG1(icall);183 dgram.iplink = IPC_GET_ARG2(icall);182 dgram.tos = ipc_get_arg1(icall); 183 dgram.iplink = ipc_get_arg2(icall); 184 184 185 185 ipc_call_t call; … … 240 240 async_get_call(&call); 241 241 242 if (! IPC_GET_IMETHOD(&call)) {242 if (!ipc_get_imethod(&call)) { 243 243 async_answer_0(&call, EOK); 244 244 return; 245 245 } 246 246 247 switch ( IPC_GET_IMETHOD(&call)) {247 switch (ipc_get_imethod(&call)) { 248 248 case INET_EV_RECV: 249 249 inet_ev_recv(&call); -
uspace/lib/c/generic/inet/tcp.c
reb13ef8 rfafb8e5 232 232 goto error; 233 233 234 conn_id = IPC_GET_ARG1(&answer);234 conn_id = ipc_get_arg1(&answer); 235 235 236 236 rc = tcp_conn_new(tcp, conn_id, cb, arg, rconn); … … 348 348 349 349 lst->tcp = tcp; 350 lst->id = IPC_GET_ARG1(&answer);350 lst->id = ipc_get_arg1(&answer); 351 351 lst->lcb = lcb; 352 352 lst->lcb_arg = larg; … … 569 569 } 570 570 571 *nrecv = IPC_GET_ARG1(&answer);571 *nrecv = ipc_get_arg1(&answer); 572 572 fibril_mutex_unlock(&conn->lock); 573 573 return EOK; … … 626 626 } 627 627 628 *nrecv = IPC_GET_ARG1(&answer);628 *nrecv = ipc_get_arg1(&answer); 629 629 fibril_mutex_unlock(&conn->lock); 630 630 return EOK; … … 643 643 errno_t rc; 644 644 645 conn_id = IPC_GET_ARG1(icall);645 conn_id = ipc_get_arg1(icall); 646 646 647 647 rc = tcp_conn_get(tcp, conn_id, &conn); … … 671 671 errno_t rc; 672 672 673 conn_id = IPC_GET_ARG1(icall);673 conn_id = ipc_get_arg1(icall); 674 674 675 675 rc = tcp_conn_get(tcp, conn_id, &conn); … … 699 699 errno_t rc; 700 700 701 conn_id = IPC_GET_ARG1(icall);701 conn_id = ipc_get_arg1(icall); 702 702 703 703 rc = tcp_conn_get(tcp, conn_id, &conn); … … 727 727 errno_t rc; 728 728 729 conn_id = IPC_GET_ARG1(icall);729 conn_id = ipc_get_arg1(icall); 730 730 731 731 rc = tcp_conn_get(tcp, conn_id, &conn); … … 771 771 errno_t rc; 772 772 773 lst_id = IPC_GET_ARG1(icall);774 conn_id = IPC_GET_ARG2(icall);773 lst_id = ipc_get_arg1(icall); 774 conn_id = ipc_get_arg2(icall); 775 775 776 776 rc = tcp_listener_get(tcp, lst_id, &lst); … … 821 821 async_get_call(&call); 822 822 823 if (! IPC_GET_IMETHOD(&call)) {823 if (!ipc_get_imethod(&call)) { 824 824 /* Hangup*/ 825 825 async_answer_0(&call, EOK); … … 827 827 } 828 828 829 switch ( IPC_GET_IMETHOD(&call)) {829 switch (ipc_get_imethod(&call)) { 830 830 case TCP_EV_CONNECTED: 831 831 tcp_ev_connected(tcp, &call); -
uspace/lib/c/generic/inet/udp.c
reb13ef8 rfafb8e5 190 190 191 191 assoc->udp = udp; 192 assoc->id = IPC_GET_ARG1(&answer);192 assoc->id = ipc_get_arg1(&answer); 193 193 assoc->cb = cb; 194 194 assoc->cb_arg = arg; … … 404 404 405 405 rmsg->udp = udp; 406 rmsg->assoc_id = IPC_GET_ARG1(&answer);407 rmsg->size = IPC_GET_ARG2(&answer);406 rmsg->assoc_id = ipc_get_arg1(&answer); 407 rmsg->size = ipc_get_arg2(&answer); 408 408 rmsg->remote_ep = ep; 409 409 return EOK; … … 498 498 async_get_call(&call); 499 499 500 if (! IPC_GET_IMETHOD(&call)) {500 if (!ipc_get_imethod(&call)) { 501 501 /* Hangup */ 502 502 async_answer_0(&call, EOK); … … 504 504 } 505 505 506 switch ( IPC_GET_IMETHOD(&call)) {506 switch (ipc_get_imethod(&call)) { 507 507 case UDP_EV_DATA: 508 508 udp_ev_data(udp, &call); -
uspace/lib/c/generic/inetcfg.c
reb13ef8 rfafb8e5 62 62 } 63 63 64 *act_size = IPC_GET_ARG1(&answer);64 *act_size = ipc_get_arg1(&answer); 65 65 return EOK; 66 66 } … … 161 161 async_wait_for(req, &retval); 162 162 163 *addr_id = IPC_GET_ARG1(&answer);163 *addr_id = ipc_get_arg1(&answer); 164 164 165 165 return retval; … … 217 217 return retval; 218 218 219 size_t act_size = IPC_GET_ARG2(&answer_name);219 size_t act_size = ipc_get_arg2(&answer_name); 220 220 assert(act_size <= LOC_NAME_MAXLEN); 221 221 222 222 name_buf[act_size] = '\0'; 223 223 224 ainfo->ilink = IPC_GET_ARG1(&answer);224 ainfo->ilink = ipc_get_arg1(&answer); 225 225 ainfo->name = str_dup(name_buf); 226 226 … … 244 244 245 245 async_wait_for(req, &retval); 246 *addr_id = IPC_GET_ARG1(&answer);246 *addr_id = ipc_get_arg1(&answer); 247 247 248 248 return retval; … … 305 305 return retval; 306 306 307 act_size = IPC_GET_ARG2(&dreply);307 act_size = ipc_get_arg2(&dreply); 308 308 assert(act_size <= LOC_NAME_MAXLEN); 309 309 name_buf[act_size] = '\0'; 310 310 311 311 linfo->name = str_dup(name_buf); 312 linfo->def_mtu = IPC_GET_ARG1(&answer);312 linfo->def_mtu = ipc_get_arg1(&answer); 313 313 314 314 return EOK; … … 359 359 async_wait_for(req, &retval); 360 360 361 *sroute_id = IPC_GET_ARG1(&answer);361 *sroute_id = ipc_get_arg1(&answer); 362 362 363 363 return retval; … … 428 428 return retval; 429 429 430 size_t act_size = IPC_GET_ARG2(&answer_name);430 size_t act_size = ipc_get_arg2(&answer_name); 431 431 assert(act_size <= LOC_NAME_MAXLEN); 432 432 … … 454 454 455 455 async_wait_for(req, &retval); 456 *sroute_id = IPC_GET_ARG1(&answer);456 *sroute_id = ipc_get_arg1(&answer); 457 457 458 458 return retval; -
uspace/lib/c/generic/inetping.c
reb13ef8 rfafb8e5 154 154 inetping_sdu_t sdu; 155 155 156 sdu.seq_no = IPC_GET_ARG1(icall);156 sdu.seq_no = ipc_get_arg1(icall); 157 157 158 158 ipc_call_t call; … … 213 213 async_get_call(&call); 214 214 215 if (! IPC_GET_IMETHOD(&call)) {215 if (!ipc_get_imethod(&call)) { 216 216 async_answer_0(&call, EOK); 217 217 return; 218 218 } 219 219 220 switch ( IPC_GET_IMETHOD(&call)) {220 switch (ipc_get_imethod(&call)) { 221 221 case INETPING_EV_RECV: 222 222 inetping_ev_recv(&call); -
uspace/lib/c/generic/io/chardev.c
reb13ef8 rfafb8e5 125 125 } 126 126 127 *nread = IPC_GET_ARG2(&answer);127 *nread = ipc_get_arg2(&answer); 128 128 /* In case of partial success, ARG1 contains the error code */ 129 return (errno_t) IPC_GET_ARG1(&answer);129 return (errno_t) ipc_get_arg1(&answer); 130 130 131 131 } … … 176 176 } 177 177 178 *nwritten = IPC_GET_ARG2(&answer);178 *nwritten = ipc_get_arg2(&answer); 179 179 /* In case of partial success, ARG1 contains the error code */ 180 return (errno_t) IPC_GET_ARG1(&answer);180 return (errno_t) ipc_get_arg1(&answer); 181 181 } 182 182 -
uspace/lib/c/generic/io/chardev_srv.c
reb13ef8 rfafb8e5 51 51 errno_t rc; 52 52 53 flags = IPC_GET_ARG1(icall);53 flags = ipc_get_arg1(icall); 54 54 55 55 ipc_call_t call; … … 154 154 ipc_call_t call; 155 155 async_get_call(&call); 156 sysarg_t method = IPC_GET_IMETHOD(&call);156 sysarg_t method = ipc_get_imethod(&call); 157 157 158 158 if (!method) { -
uspace/lib/c/generic/io/con_srv.c
reb13ef8 rfafb8e5 44 44 static errno_t console_ev_encode(cons_event_t *event, ipc_call_t *icall) 45 45 { 46 IPC_SET_ARG1(icall, event->type);46 ipc_set_arg1(icall, event->type); 47 47 48 48 switch (event->type) { 49 49 case CEV_KEY: 50 IPC_SET_ARG2(icall, event->ev.key.type);51 IPC_SET_ARG3(icall, event->ev.key.key);52 IPC_SET_ARG4(icall, event->ev.key.mods);53 IPC_SET_ARG5(icall, event->ev.key.c);50 ipc_set_arg2(icall, event->ev.key.type); 51 ipc_set_arg3(icall, event->ev.key.key); 52 ipc_set_arg4(icall, event->ev.key.mods); 53 ipc_set_arg5(icall, event->ev.key.c); 54 54 break; 55 55 case CEV_POS: 56 IPC_SET_ARG2(icall, (event->ev.pos.pos_id << 16) | (event->ev.pos.type & 0xffff));57 IPC_SET_ARG3(icall, event->ev.pos.btn_num);58 IPC_SET_ARG4(icall, event->ev.pos.hpos);59 IPC_SET_ARG5(icall, event->ev.pos.vpos);56 ipc_set_arg2(icall, (event->ev.pos.pos_id << 16) | (event->ev.pos.type & 0xffff)); 57 ipc_set_arg3(icall, event->ev.pos.btn_num); 58 ipc_set_arg4(icall, event->ev.pos.hpos); 59 ipc_set_arg5(icall, event->ev.pos.vpos); 60 60 break; 61 61 default: … … 158 158 sysarg_t row; 159 159 160 col = IPC_GET_ARG1(icall);161 row = IPC_GET_ARG2(icall);160 col = ipc_get_arg1(icall); 161 row = ipc_get_arg2(icall); 162 162 163 163 if (srv->srvs->ops->set_pos == NULL) { … … 218 218 console_style_t style; 219 219 220 style = IPC_GET_ARG1(icall);220 style = ipc_get_arg1(icall); 221 221 222 222 if (srv->srvs->ops->set_style == NULL) { … … 235 235 console_color_attr_t flags; 236 236 237 bgcolor = IPC_GET_ARG1(icall);238 fgcolor = IPC_GET_ARG2(icall);239 flags = IPC_GET_ARG3(icall);237 bgcolor = ipc_get_arg1(icall); 238 fgcolor = ipc_get_arg2(icall); 239 flags = ipc_get_arg3(icall); 240 240 241 241 if (srv->srvs->ops->set_color == NULL) { … … 253 253 pixel_t fgcolor; 254 254 255 bgcolor = IPC_GET_ARG1(icall);256 fgcolor = IPC_GET_ARG2(icall);255 bgcolor = ipc_get_arg1(icall); 256 fgcolor = ipc_get_arg2(icall); 257 257 258 258 if (srv->srvs->ops->set_rgb_color == NULL) { … … 269 269 bool show; 270 270 271 show = IPC_GET_ARG1(icall);271 show = ipc_get_arg1(icall); 272 272 273 273 if (srv->srvs->ops->set_cursor_visibility == NULL) { … … 303 303 } 304 304 305 async_answer_5(icall, rc, IPC_GET_ARG1(&result), IPC_GET_ARG2(&result),306 IPC_GET_ARG3(&result), IPC_GET_ARG4(&result), IPC_GET_ARG5(&result));305 async_answer_5(icall, rc, ipc_get_arg1(&result), ipc_get_arg2(&result), 306 ipc_get_arg3(&result), ipc_get_arg4(&result), ipc_get_arg5(&result)); 307 307 } 308 308 … … 364 364 break; 365 365 366 sysarg_t method = IPC_GET_IMETHOD(&call);366 sysarg_t method = ipc_get_imethod(&call); 367 367 368 368 if (!method) { -
uspace/lib/c/generic/io/console.c
reb13ef8 rfafb8e5 156 156 static errno_t console_ev_decode(ipc_call_t *call, cons_event_t *event) 157 157 { 158 event->type = IPC_GET_ARG1(call);158 event->type = ipc_get_arg1(call); 159 159 160 160 switch (event->type) { 161 161 case CEV_KEY: 162 event->ev.key.type = IPC_GET_ARG2(call);163 event->ev.key.key = IPC_GET_ARG3(call);164 event->ev.key.mods = IPC_GET_ARG4(call);165 event->ev.key.c = IPC_GET_ARG5(call);162 event->ev.key.type = ipc_get_arg2(call); 163 event->ev.key.key = ipc_get_arg3(call); 164 event->ev.key.mods = ipc_get_arg4(call); 165 event->ev.key.c = ipc_get_arg5(call); 166 166 break; 167 167 case CEV_POS: 168 event->ev.pos.pos_id = IPC_GET_ARG2(call) >> 16;169 event->ev.pos.type = IPC_GET_ARG2(call) & 0xffff;170 event->ev.pos.btn_num = IPC_GET_ARG3(call);171 event->ev.pos.hpos = IPC_GET_ARG4(call);172 event->ev.pos.vpos = IPC_GET_ARG5(call);168 event->ev.pos.pos_id = ipc_get_arg2(call) >> 16; 169 event->ev.pos.type = ipc_get_arg2(call) & 0xffff; 170 event->ev.pos.btn_num = ipc_get_arg3(call); 171 event->ev.pos.hpos = ipc_get_arg4(call); 172 event->ev.pos.vpos = ipc_get_arg5(call); 173 173 break; 174 174 default: -
uspace/lib/c/generic/io/input.c
reb13ef8 rfafb8e5 112 112 errno_t rc; 113 113 114 type = IPC_GET_ARG1(call);115 key = IPC_GET_ARG2(call);116 mods = IPC_GET_ARG3(call);117 c = IPC_GET_ARG4(call);114 type = ipc_get_arg1(call); 115 key = ipc_get_arg2(call); 116 mods = ipc_get_arg3(call); 117 c = ipc_get_arg4(call); 118 118 119 119 rc = input->ev_ops->key(input, type, key, mods, c); … … 127 127 errno_t rc; 128 128 129 dx = IPC_GET_ARG1(call);130 dy = IPC_GET_ARG2(call);129 dx = ipc_get_arg1(call); 130 dy = ipc_get_arg2(call); 131 131 132 132 rc = input->ev_ops->move(input, dx, dy); … … 142 142 errno_t rc; 143 143 144 x = IPC_GET_ARG1(call);145 y = IPC_GET_ARG2(call);146 max_x = IPC_GET_ARG3(call);147 max_y = IPC_GET_ARG4(call);144 x = ipc_get_arg1(call); 145 y = ipc_get_arg2(call); 146 max_x = ipc_get_arg3(call); 147 max_y = ipc_get_arg4(call); 148 148 149 149 rc = input->ev_ops->abs_move(input, x, y, max_x, max_y); … … 157 157 errno_t rc; 158 158 159 bnum = IPC_GET_ARG1(call);160 press = IPC_GET_ARG2(call);159 bnum = ipc_get_arg1(call); 160 press = ipc_get_arg2(call); 161 161 162 162 rc = input->ev_ops->button(input, bnum, press); … … 172 172 async_get_call(&call); 173 173 174 if (! IPC_GET_IMETHOD(&call)) {174 if (!ipc_get_imethod(&call)) { 175 175 async_answer_0(&call, EOK); 176 176 return; 177 177 } 178 178 179 switch ( IPC_GET_IMETHOD(&call)) {179 switch (ipc_get_imethod(&call)) { 180 180 case INPUT_EVENT_ACTIVE: 181 181 input_ev_active(input, &call); -
uspace/lib/c/generic/io/log.c
reb13ef8 rfafb8e5 208 208 return parent; 209 209 210 return IPC_GET_ARG1(&answer);210 return ipc_get_arg1(&answer); 211 211 } 212 212 -
uspace/lib/c/generic/io/output.c
reb13ef8 rfafb8e5 100 100 return 0; 101 101 102 return (frontbuf_handle_t) IPC_GET_ARG1(&answer);102 return (frontbuf_handle_t) ipc_get_arg1(&answer); 103 103 } 104 104 -
uspace/lib/c/generic/ipc.c
reb13ef8 rfafb8e5 98 98 ipc_call_t data; 99 99 100 IPC_SET_IMETHOD(&data, imethod);101 IPC_SET_ARG1(&data, arg1);102 IPC_SET_ARG2(&data, arg2);103 IPC_SET_ARG3(&data, arg3);104 IPC_SET_ARG4(&data, arg4);105 IPC_SET_ARG5(&data, arg5);100 ipc_set_imethod(&data, imethod); 101 ipc_set_arg1(&data, arg1); 102 ipc_set_arg2(&data, arg2); 103 ipc_set_arg3(&data, arg3); 104 ipc_set_arg4(&data, arg4); 105 ipc_set_arg5(&data, arg5); 106 106 107 107 return __SYSCALL3(SYS_IPC_CALL_ASYNC_SLOW, … … 152 152 ipc_call_t data; 153 153 154 IPC_SET_RETVAL(&data, retval);155 IPC_SET_ARG1(&data, arg1);156 IPC_SET_ARG2(&data, arg2);157 IPC_SET_ARG3(&data, arg3);158 IPC_SET_ARG4(&data, arg4);159 IPC_SET_ARG5(&data, arg5);154 ipc_set_retval(&data, retval); 155 ipc_set_arg1(&data, arg1); 156 ipc_set_arg2(&data, arg2); 157 ipc_set_arg3(&data, arg3); 158 ipc_set_arg4(&data, arg4); 159 ipc_set_arg5(&data, arg5); 160 160 161 161 return (errno_t) __SYSCALL2(SYS_IPC_ANSWER_SLOW, … … 220 220 ipc_call_t data; 221 221 222 IPC_SET_IMETHOD(&data, imethod);223 IPC_SET_ARG1(&data, arg1);224 IPC_SET_ARG2(&data, arg2);225 IPC_SET_ARG3(&data, arg3);226 IPC_SET_ARG4(&data, arg4);227 IPC_SET_ARG5(&data, arg5);222 ipc_set_imethod(&data, imethod); 223 ipc_set_arg1(&data, arg1); 224 ipc_set_arg2(&data, arg2); 225 ipc_set_arg3(&data, arg3); 226 ipc_set_arg4(&data, arg4); 227 ipc_set_arg5(&data, arg5); 228 228 229 229 return (errno_t) __SYSCALL4(SYS_IPC_FORWARD_SLOW, -
uspace/lib/c/generic/iplink.c
reb13ef8 rfafb8e5 248 248 iplink_recv_sdu_t sdu; 249 249 250 ip_ver_t ver = IPC_GET_ARG1(icall);250 ip_ver_t ver = ipc_get_arg1(icall); 251 251 252 252 errno_t rc = async_data_write_accept(&sdu.data, false, 0, 0, 0, … … 287 287 async_get_call(&call); 288 288 289 if (! IPC_GET_IMETHOD(&call)) {289 if (!ipc_get_imethod(&call)) { 290 290 async_answer_0(&call, EOK); 291 291 return; 292 292 } 293 293 294 switch ( IPC_GET_IMETHOD(&call)) {294 switch (ipc_get_imethod(&call)) { 295 295 case IPLINK_EV_RECV: 296 296 iplink_ev_recv(iplink, &call); -
uspace/lib/c/generic/iplink_srv.c
reb13ef8 rfafb8e5 162 162 iplink_sdu_t sdu; 163 163 164 sdu.src = IPC_GET_ARG1(icall);165 sdu.dest = IPC_GET_ARG2(icall);164 sdu.src = ipc_get_arg1(icall); 165 sdu.dest = ipc_get_arg2(icall); 166 166 167 167 errno_t rc = async_data_write_accept(&sdu.data, false, 0, 0, 0, … … 253 253 ipc_call_t call; 254 254 async_get_call(&call); 255 sysarg_t method = IPC_GET_IMETHOD(&call);255 sysarg_t method = ipc_get_imethod(&call); 256 256 257 257 if (!method) { -
uspace/lib/c/generic/loc.c
reb13ef8 rfafb8e5 62 62 async_get_call(&call); 63 63 64 if (! IPC_GET_IMETHOD(&call)) {64 if (!ipc_get_imethod(&call)) { 65 65 async_answer_0(&call, EOK); 66 66 return; 67 67 } 68 68 69 switch ( IPC_GET_IMETHOD(&call)) {69 switch (ipc_get_imethod(&call)) { 70 70 case LOC_EVENT_CAT_CHANGE: 71 71 fibril_mutex_lock(&loc_callback_mutex); … … 303 303 304 304 if (sid != NULL) 305 *sid = (service_id_t) IPC_GET_ARG1(&answer);305 *sid = (service_id_t) ipc_get_arg1(&answer); 306 306 307 307 return retval; … … 359 359 360 360 if (handle != NULL) 361 *handle = (service_id_t) IPC_GET_ARG1(&answer);361 *handle = (service_id_t) ipc_get_arg1(&answer); 362 362 363 363 return retval; … … 404 404 return retval; 405 405 406 act_size = IPC_GET_ARG2(&dreply);406 act_size = ipc_get_arg2(&dreply); 407 407 assert(act_size <= LOC_NAME_MAXLEN); 408 408 name_buf[act_size] = '\0'; … … 492 492 493 493 if (handle != NULL) 494 *handle = (service_id_t) IPC_GET_ARG1(&answer);494 *handle = (service_id_t) ipc_get_arg1(&answer); 495 495 496 496 return retval; … … 541 541 542 542 if (cat_id != NULL) 543 *cat_id = (category_id_t) IPC_GET_ARG1(&answer);543 *cat_id = (category_id_t) ipc_get_arg1(&answer); 544 544 545 545 return retval; … … 778 778 } 779 779 780 *act_size = IPC_GET_ARG1(&answer);780 *act_size = ipc_get_arg1(&answer); 781 781 return EOK; 782 782 } -
uspace/lib/c/generic/pci.c
reb13ef8 rfafb8e5 122 122 } 123 123 124 *act_size = IPC_GET_ARG1(&answer);124 *act_size = ipc_get_arg1(&answer); 125 125 return EOK; 126 126 } -
uspace/lib/c/generic/task.c
reb13ef8 rfafb8e5 374 374 375 375 if (rc == EOK) { 376 *texit = IPC_GET_ARG1(&wait->result);377 *retval = IPC_GET_ARG2(&wait->result);376 *texit = ipc_get_arg1(&wait->result); 377 *retval = ipc_get_arg2(&wait->result); 378 378 } 379 379 -
uspace/lib/c/generic/vbd.c
reb13ef8 rfafb8e5 190 190 } 191 191 192 *act_size = IPC_GET_ARG1(&answer);192 *act_size = ipc_get_arg1(&answer); 193 193 return EOK; 194 194 } … … 300 300 return EIO; 301 301 302 *rpart = (vbd_part_id_t) IPC_GET_ARG1(&answer);302 *rpart = (vbd_part_id_t)ipc_get_arg1(&answer); 303 303 return EOK; 304 304 -
uspace/lib/c/generic/vfs/vfs.c
reb13ef8 rfafb8e5 641 641 642 642 if (mountedfd) 643 *mountedfd = (int) IPC_GET_ARG1(&answer);643 *mountedfd = (int) ipc_get_arg1(&answer); 644 644 645 645 if (rc != EOK) … … 903 903 return rc; 904 904 905 *nread = (ssize_t) IPC_GET_ARG1(&answer);905 *nread = (ssize_t) ipc_get_arg1(&answer); 906 906 return EOK; 907 907 } … … 1283 1283 return (errno_t) rc; 1284 1284 1285 *handle = (int) IPC_GET_ARG1(&answer);1285 *handle = (int) ipc_get_arg1(&answer); 1286 1286 return EOK; 1287 1287 } … … 1367 1367 return rc; 1368 1368 1369 *nwritten = (ssize_t) IPC_GET_ARG1(&answer);1369 *nwritten = (ssize_t) ipc_get_arg1(&answer); 1370 1370 return EOK; 1371 1371 } -
uspace/lib/c/generic/vol.c
reb13ef8 rfafb8e5 127 127 } 128 128 129 *act_size = IPC_GET_ARG1(&answer);129 *act_size = ipc_get_arg1(&answer); 130 130 return EOK; 131 131 } -
uspace/lib/c/include/ipc/dev_iface.h
reb13ef8 rfafb8e5 91 91 */ 92 92 93 #define DEV_IPC_GET_ARG1(call) IPC_GET_ARG2(&(call))94 #define DEV_IPC_GET_ARG2(call) IPC_GET_ARG3(&(call))95 #define DEV_IPC_GET_ARG3(call) IPC_GET_ARG4(&(call))96 #define DEV_IPC_GET_ARG4(call) IPC_GET_ARG5(&(call))93 #define DEV_IPC_GET_ARG1(call) ipc_get_arg2(&(call)) 94 #define DEV_IPC_GET_ARG2(call) ipc_get_arg3(&(call)) 95 #define DEV_IPC_GET_ARG3(call) ipc_get_arg4(&(call)) 96 #define DEV_IPC_GET_ARG4(call) ipc_get_arg5(&(call)) 97 97 98 98 #endif
Note:
See TracChangeset
for help on using the changeset viewer.