Changeset 466e95f7 in mainline for kernel/generic/include/ipc


Ignore:
Timestamp:
2012-10-03T21:08:54Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
faa45c17
Parents:
716185d
Message:

Add SYSIPC_OP macro to avoid repeating the same boilerplate code.

File:
1 edited

Legend:

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

    r716185d r466e95f7  
    3737
    3838#include <ipc/ipc.h>
     39
     40#define SYSIPC_OP(op, call, ...) \
     41        ({ \
     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; \
     49        })
    3950
    4051/**
     
    95106         * Invoked on:          all forgotten calls
    96107         */     
    97         void (* request_forget)(call_t *);
     108        int (* request_forget)(call_t *);
    98109
    99110        /**
     
    116127         * Invoked on:          all forgotten calls
    117128         */
    118         void (* answer_cleanup)(call_t *, ipc_data_t *);
     129        int (* answer_cleanup)(call_t *, ipc_data_t *);
    119130
    120131        /**
     
    143154
    144155extern int null_request_preprocess(call_t *, phone_t *);
    145 extern void null_request_forget(call_t *);
     156extern int null_request_forget(call_t *);
    146157extern int null_request_process(call_t *, answerbox_t *);
    147 extern void null_answer_cleanup(call_t *, ipc_data_t *);
     158extern int null_answer_cleanup(call_t *, ipc_data_t *);
    148159extern int null_answer_preprocess(call_t *, ipc_data_t *);
    149160extern int null_answer_process(call_t *);
Note: See TracChangeset for help on using the changeset viewer.