Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset d0c2beb in mainline


Ignore:
Timestamp:
2017-12-19T17:38:18Z (4 years ago)
Author:
Jiří Zárevúcky <zarevucky.jiri@…>
Branches:
lfn, master
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.