Changeset ab87db5 in mainline for uspace/app


Ignore:
Timestamp:
2019-02-23T17:16:01Z (7 years ago)
Author:
GitHub <noreply@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
8c193d83, ca0e838
Parents:
bc417660 (diff), 95a47b0 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Jiří Zárevúcky <zarevucky.jiri@…> (2019-02-23 17:16:01)
git-committer:
GitHub <noreply@…> (2019-02-23 17:16:01)
Message:

Merge pull request #157

Turn some function-like macros into functions

Location:
uspace/app
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/kio/kio.c

    rbc417660 rab87db5  
    164164        fibril_mutex_lock(&mtx);
    165165
    166         size_t kio_start = (size_t) IPC_GET_ARG1(*call);
    167         size_t kio_len = (size_t) IPC_GET_ARG2(*call);
    168         size_t kio_stored = (size_t) IPC_GET_ARG3(*call);
     166        size_t kio_start = (size_t) ipc_get_arg1(call);
     167        size_t kio_len = (size_t) ipc_get_arg2(call);
     168        size_t kio_stored = (size_t) ipc_get_arg3(call);
    169169
    170170        size_t offset = (kio_start + kio_len - kio_stored) % kio_length;
  • uspace/app/trace/ipcp.c

    rbc417660 rab87db5  
    7575{
    7676        cap_call_handle_t *chandle = (cap_call_handle_t *) key;
    77         return CAP_HANDLE_RAW(*chandle);
     77        return cap_handle_raw(*chandle);
    7878}
    7979
     
    8181{
    8282        pending_call_t *hs = hash_table_get_inst(item, pending_call_t, link);
    83         return CAP_HANDLE_RAW(hs->call_handle);
     83        return cap_handle_raw(hs->call_handle);
    8484}
    8585
     
    104104        // XXX: there is no longer a limit on the number of phones as phones are
    105105        // now handled using capabilities
    106         if (CAP_HANDLE_RAW(phone) < 0 || CAP_HANDLE_RAW(phone) >= MAX_PHONE)
     106        if (cap_handle_raw(phone) < 0 || cap_handle_raw(phone) >= MAX_PHONE)
    107107                return;
    108         connections[CAP_HANDLE_RAW(phone)].server = server;
    109         connections[CAP_HANDLE_RAW(phone)].proto = proto;
    110         have_conn[CAP_HANDLE_RAW(phone)] = 1;
     108        connections[cap_handle_raw(phone)].server = server;
     109        connections[cap_handle_raw(phone)].proto = proto;
     110        have_conn[cap_handle_raw(phone)] = 1;
    111111}
    112112
    113113void ipcp_connection_clear(cap_phone_handle_t phone)
    114114{
    115         have_conn[CAP_HANDLE_RAW(phone)] = 0;
    116         connections[CAP_HANDLE_RAW(phone)].server = 0;
    117         connections[CAP_HANDLE_RAW(phone)].proto = NULL;
     115        have_conn[cap_handle_raw(phone)] = 0;
     116        connections[cap_handle_raw(phone)].server = 0;
     117        connections[cap_handle_raw(phone)].proto = NULL;
    118118}
    119119
     
    184184        int i;
    185185
    186         if (have_conn[CAP_HANDLE_RAW(phandle)])
    187                 proto = connections[CAP_HANDLE_RAW(phandle)].proto;
     186        if (have_conn[cap_handle_raw(phandle)])
     187                proto = connections[cap_handle_raw(phandle)].proto;
    188188        else
    189189                proto = NULL;
     
    194194                printf("Call handle: %p, phone: %p, proto: %s, method: ",
    195195                    chandle, phandle, (proto ? proto->name : "n/a"));
    196                 ipc_m_print(proto, IPC_GET_IMETHOD(*call));
     196                ipc_m_print(proto, ipc_get_imethod(call));
    197197                printf(" args: (%" PRIun ", %" PRIun ", %" PRIun ", "
    198198                    "%" PRIun ", %" PRIun ")\n",
     
    203203
    204204                if (proto != NULL) {
    205                         oper = proto_get_oper(proto, IPC_GET_IMETHOD(*call));
     205                        oper = proto_get_oper(proto, ipc_get_imethod(call));
    206206                } else {
    207207                        oper = NULL;
     
    262262
    263263        phone = pcall->phone_handle;
    264         method = IPC_GET_IMETHOD(pcall->question);
    265         retval = IPC_GET_RETVAL(*answer);
     264        method = ipc_get_imethod(&pcall->question);
     265        retval = ipc_get_retval(answer);
    266266
    267267        resp = answer->args;
     
    270270                printf("Response to %p: retval=%s, args = (%" PRIun ", "
    271271                    "%" PRIun ", %" PRIun ", %" PRIun ", %" PRIun ")\n",
    272                     call_handle, str_error_name(retval), IPC_GET_ARG1(*answer),
    273                     IPC_GET_ARG2(*answer), IPC_GET_ARG3(*answer),
    274                     IPC_GET_ARG4(*answer), IPC_GET_ARG5(*answer));
     272                    call_handle, str_error_name(retval), ipc_get_arg1(answer),
     273                    ipc_get_arg2(answer), ipc_get_arg3(answer),
     274                    ipc_get_arg4(answer), ipc_get_arg5(answer));
    275275        }
    276276
     
    305305            (retval == 0)) {
    306306                /* Connected to a service (through NS) */
    307                 service = IPC_GET_ARG2(pcall->question);
     307                service = ipc_get_arg2(&pcall->question);
    308308                proto = proto_get_by_srv(service);
    309309                if (proto == NULL)
    310310                        proto = proto_unknown;
    311311
    312                 cphone = (cap_phone_handle_t) IPC_GET_ARG5(*answer);
     312                cphone = (cap_phone_handle_t) ipc_get_arg5(answer);
    313313                if ((display_mask & DM_SYSTEM) != 0) {
    314314                        printf("Registering connection (phone %p, protocol: %s)\n", cphone,
  • uspace/app/trace/trace.c

    rbc417660 rab87db5  
    302302        phandle = (cap_phone_handle_t) sc_args[0];
    303303
    304         IPC_SET_IMETHOD(call, sc_args[1]);
    305         IPC_SET_ARG1(call, sc_args[2]);
    306         IPC_SET_ARG2(call, sc_args[3]);
    307         IPC_SET_ARG3(call, sc_args[4]);
    308         IPC_SET_ARG4(call, sc_args[5]);
    309         IPC_SET_ARG5(call, 0);
     304        ipc_set_imethod(&call, sc_args[1]);
     305        ipc_set_arg1(&call, sc_args[2]);
     306        ipc_set_arg2(&call, sc_args[3]);
     307        ipc_set_arg3(&call, sc_args[4]);
     308        ipc_set_arg4(&call, sc_args[5]);
     309        ipc_set_arg5(&call, 0);
    310310
    311311        ipcp_call_out(phandle, &call, 0);
  • uspace/app/wavplay/dplay.c

    rbc417660 rab87db5  
    103103                async_get_call(&call);
    104104
    105                 switch (IPC_GET_IMETHOD(call)) {
     105                switch (ipc_get_imethod(&call)) {
    106106                case PCM_EVENT_PLAYBACK_STARTED:
    107107                case PCM_EVENT_FRAMES_PLAYED:
    108                         printf("%" PRIun " frames: ", IPC_GET_ARG1(call));
     108                        printf("%" PRIun " frames: ", ipc_get_arg1(&call));
    109109                        async_answer_0(&call, EOK);
    110110                        break;
     
    118118                        return;
    119119                default:
    120                         printf("Unknown event %" PRIun ".\n", IPC_GET_IMETHOD(call));
     120                        printf("Unknown event %" PRIun ".\n", ipc_get_imethod(&call));
    121121                        async_answer_0(&call, ENOTSUP);
    122122                        continue;
  • uspace/app/wavplay/drec.c

    rbc417660 rab87db5  
    103103                async_get_call(&call);
    104104
    105                 switch (IPC_GET_IMETHOD(call)) {
     105                switch (ipc_get_imethod(&call)) {
    106106                case PCM_EVENT_CAPTURE_TERMINATED:
    107107                        printf("Recording terminated\n");
     
    109109                        break;
    110110                case PCM_EVENT_FRAMES_CAPTURED:
    111                         printf("%" PRIun " frames\n", IPC_GET_ARG1(call));
     111                        printf("%" PRIun " frames\n", ipc_get_arg1(&call));
    112112                        break;
    113113                default:
    114                         printf("Unknown event %" PRIun ".\n", IPC_GET_IMETHOD(call));
     114                        printf("Unknown event %" PRIun ".\n", ipc_get_imethod(&call));
    115115                        async_answer_0(&call, ENOTSUP);
    116116                        continue;
Note: See TracChangeset for help on using the changeset viewer.