Changeset eb13ef8 in mainline for uspace/lib/c/generic/async/server.c


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:
fafb8e5
Parents:
bb97118
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-02 14:04:02)
git-committer:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-06 13:25:12)
Message:

Change IPC_GET_* and IPC_SET_* to accept pointer instead of lvalue

File:
1 edited

Legend:

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

    rbb97118 reb13ef8  
    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.