Changeset fafb8e5 in mainline for uspace/lib/c/generic/async


Ignore:
Timestamp:
2019-02-06T13:25:12Z (6 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
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)
Message:

Mechanically lowercase IPC_SET_*/IPC_GET_*

Location:
uspace/lib/c/generic/async
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/generic/async/client.c

    reb13ef8 rfafb8e5  
    216216        fibril_rmutex_lock(&message_mutex);
    217217
    218         msg->retval = IPC_GET_RETVAL(data);
     218        msg->retval = ipc_get_retval(data);
    219219
    220220        /* Copy data inside lock, just in case the call was detached */
     
    486486
    487487        if (r1)
    488                 *r1 = IPC_GET_ARG1(&result);
     488                *r1 = ipc_get_arg1(&result);
    489489
    490490        if (r2)
    491                 *r2 = IPC_GET_ARG2(&result);
     491                *r2 = ipc_get_arg2(&result);
    492492
    493493        if (r3)
    494                 *r3 = IPC_GET_ARG3(&result);
     494                *r3 = ipc_get_arg3(&result);
    495495
    496496        if (r4)
    497                 *r4 = IPC_GET_ARG4(&result);
     497                *r4 = ipc_get_arg4(&result);
    498498
    499499        if (r5)
    500                 *r5 = IPC_GET_ARG5(&result);
     500                *r5 = ipc_get_arg5(&result);
    501501
    502502        return rc;
     
    538538
    539539        if (r1)
    540                 *r1 = IPC_GET_ARG1(&result);
     540                *r1 = ipc_get_arg1(&result);
    541541
    542542        if (r2)
    543                 *r2 = IPC_GET_ARG2(&result);
     543                *r2 = ipc_get_arg2(&result);
    544544
    545545        if (r3)
    546                 *r3 = IPC_GET_ARG3(&result);
     546                *r3 = ipc_get_arg3(&result);
    547547
    548548        if (r4)
    549                 *r4 = IPC_GET_ARG4(&result);
     549                *r4 = ipc_get_arg4(&result);
    550550
    551551        if (r5)
    552                 *r5 = IPC_GET_ARG5(&result);
     552                *r5 = ipc_get_arg5(&result);
    553553
    554554        return rc;
     
    805805                return rc;
    806806
    807         *out_phone = (cap_phone_handle_t) IPC_GET_ARG5(&result);
     807        *out_phone = (cap_phone_handle_t) ipc_get_arg5(&result);
    808808        return EOK;
    809809}
  • uspace/lib/c/generic/async/server.c

    reb13ef8 rfafb8e5  
    546546        errno_t rc = mpsc_send(conn->msg_channel, call);
    547547
    548         if (IPC_GET_IMETHOD(call) == IPC_M_PHONE_HUNGUP) {
     548        if (ipc_get_imethod(call) == IPC_M_PHONE_HUNGUP) {
    549549                /* Close the channel, but let the connection fibril answer. */
    550550                mpsc_close(conn->msg_channel);
     
    657657
    658658        ht_link_t *link = hash_table_find(&notification_hash_table,
    659             &IPC_GET_IMETHOD(call));
     659            &ipc_get_imethod(call));
    660660        if (!link) {
    661661                /* Invalid notification. */
     
    871871
    872872                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);
    874874                call->cap_handle = CAP_NIL;
    875875        }
     
    944944
    945945        /* New connection */
    946         if (IPC_GET_IMETHOD(call) == IPC_M_CONNECT_ME_TO) {
     946        if (ipc_get_imethod(call) == IPC_M_CONNECT_ME_TO) {
    947947                connection_t *conn = calloc(1, sizeof(*conn));
    948948                if (!conn) {
     
    951951                }
    952952
    953                 iface_t iface = (iface_t) IPC_GET_ARG1(call);
     953                iface_t iface = (iface_t) ipc_get_arg1(call);
    954954
    955955                // TODO: Currently ignores all ports but the first one.
     
    12211221        async_get_call(call);
    12221222
    1223         if (IPC_GET_IMETHOD(call) != IPC_M_SHARE_IN)
     1223        if (ipc_get_imethod(call) != IPC_M_SHARE_IN)
    12241224                return false;
    12251225
    1226         *size = (size_t) IPC_GET_ARG1(call);
     1226        *size = (size_t) ipc_get_arg1(call);
    12271227        return true;
    12281228}
     
    12761276        async_get_call(call);
    12771277
    1278         if (IPC_GET_IMETHOD(call) != IPC_M_SHARE_OUT)
     1278        if (ipc_get_imethod(call) != IPC_M_SHARE_OUT)
    12791279                return false;
    12801280
    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);
    12831283        return true;
    12841284}
     
    13291329        async_get_call(call);
    13301330
    1331         if (IPC_GET_IMETHOD(call) != IPC_M_DATA_READ)
     1331        if (ipc_get_imethod(call) != IPC_M_DATA_READ)
    13321332                return false;
    13331333
    13341334        if (size)
    1335                 *size = (size_t) IPC_GET_ARG2(call);
     1335                *size = (size_t) ipc_get_arg2(call);
    13361336
    13371337        return true;
     
    14881488        async_get_call(call);
    14891489
    1490         if (IPC_GET_IMETHOD(call) != IPC_M_DATA_WRITE)
     1490        if (ipc_get_imethod(call) != IPC_M_DATA_WRITE)
    14911491                return false;
    14921492
    14931493        if (size)
    1494                 *size = (size_t) IPC_GET_ARG2(call);
     1494                *size = (size_t) ipc_get_arg2(call);
    14951495
    14961496        return true;
     
    17321732        async_get_call(&call);
    17331733
    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) ||
    17371737            !cap_handle_valid((phandle))) {
    17381738                async_answer_0(&call, EINVAL);
     
    17761776async_sess_t *async_callback_receive_start(exch_mgmt_t mgmt, ipc_call_t *call)
    17771777{
    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) ||
    17811781            !cap_handle_valid((phandle)))
    17821782                return NULL;
     
    18031803        async_get_call(call);
    18041804
    1805         if (IPC_GET_IMETHOD(call) != IPC_M_STATE_CHANGE_AUTHORIZE)
     1805        if (ipc_get_imethod(call) != IPC_M_STATE_CHANGE_AUTHORIZE)
    18061806                return false;
    18071807
Note: See TracChangeset for help on using the changeset viewer.