Ignore:
Timestamp:
2019-02-23T17:16:01Z (5 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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/ops/datawrite.c

    rbc417660 rab87db5  
    4343static errno_t request_preprocess(call_t *call, phone_t *phone)
    4444{
    45         uintptr_t src = IPC_GET_ARG1(call->data);
    46         size_t size = IPC_GET_ARG2(call->data);
     45        uintptr_t src = ipc_get_arg1(&call->data);
     46        size_t size = ipc_get_arg2(&call->data);
    4747
    4848        if (size > DATA_XFER_LIMIT) {
    49                 int flags = IPC_GET_ARG3(call->data);
     49                int flags = ipc_get_arg3(&call->data);
    5050
    5151                if (flags & IPC_XF_RESTRICT) {
    5252                        size = DATA_XFER_LIMIT;
    53                         IPC_SET_ARG2(call->data, size);
     53                        ipc_set_arg2(&call->data, size);
    5454                } else
    5555                        return ELIMIT;
     
    7575        assert(answer->buffer);
    7676
    77         if (!IPC_GET_RETVAL(answer->data)) {
     77        if (!ipc_get_retval(&answer->data)) {
    7878                /* The recipient agreed to receive data. */
    79                 uintptr_t dst = (uintptr_t)IPC_GET_ARG1(answer->data);
    80                 size_t size = (size_t)IPC_GET_ARG2(answer->data);
    81                 size_t max_size = (size_t)IPC_GET_ARG2(*olddata);
     79                uintptr_t dst = (uintptr_t)ipc_get_arg1(&answer->data);
     80                size_t size = (size_t)ipc_get_arg2(&answer->data);
     81                size_t max_size = (size_t)ipc_get_arg2(olddata);
    8282
    8383                if (size <= max_size) {
     
    8585                            answer->buffer, size);
    8686                        if (rc)
    87                                 IPC_SET_RETVAL(answer->data, rc);
     87                                ipc_set_retval(&answer->data, rc);
    8888                } else {
    89                         IPC_SET_RETVAL(answer->data, ELIMIT);
     89                        ipc_set_retval(&answer->data, ELIMIT);
    9090                }
    9191        }
Note: See TracChangeset for help on using the changeset viewer.