Ignore:
Timestamp:
2017-12-19T17:38:18Z (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:
219c530
Parents:
89ea2dc
Message:

Make SYSIPC_OP work regardless of the return type.

Currently, the macro assumes that the result is an error code, which
is not true for request_process. The if (ops->op) is turned to an
assert, because there's always at least a null_xxx stub assigned.
Null pointer should never occur in any of those fields.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/ipc/sysipc_ops.h

    r89ea2dc rd0c2beb  
    4040#define SYSIPC_OP(op, call, ...) \
    4141        ({ \
    42                 int rc = EOK; \
    43                 \
    44                 sysipc_ops_t *ops; \
    45                 ops = sysipc_ops_get((call)->request_method); \
    46                 if (ops->op) \
    47                         rc = ops->op((call), ##__VA_ARGS__); \
    48                 rc; \
     42                sysipc_ops_t *ops = sysipc_ops_get((call)->request_method); \
     43                assert(ops->op); \
     44                ops->op((call), ##__VA_ARGS__); \
    4945        })
    5046
Note: See TracChangeset for help on using the changeset viewer.