Ignore:
File:
1 edited

Legend:

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

    r466e95f7 rcd671c3  
    3838#include <ipc/ipc.h>
    3939
    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         })
    50 
    51 /**
    52  * This header declares the per-method IPC callbacks. Using these callbacks,
    53  * each IPC method (but system methods in particular), can define actions that
    54  * will be called at specific moments in the call life-cycle.
    55  *
    56  * Normally, the kernel will attempt to invoke the following callbacks in the
    57  * following order on each call:
    58  *
    59  * request_preprocess()
    60  * request_process()
    61  * answer_preprocess()
    62  * answer_process()
    63  *
    64  * This callback invocation sequence is a natural order of processing. Note,
    65  * however, that due to various special circumstances, callbacks may be called
    66  * also in a different than natural order of processing. This means that some
    67  * callbacks may be skipped and some others may be called instead.
    68  *
    69  * The additional callbacks that may be called are as follows:
    70  *
    71  * request_forget()
    72  * answer_cleanup()
    73  *
    74  * There are several notable scenarios in which some callbacks of the natural
    75  * order of processing will be skipped.
    76  *
    77  * The request_process(), answer_preprocess() and answer_process() callbacks
    78  * will be skipped if the call cannot be delivered to the callee. This may
    79  * happen when e.g. the request_preprocess() callback fails or the connection
    80  * to the callee is not functional. The next callback that will be invoked on
    81  * the call is request_forget().
    82  *
    83  * The comments for each callback type describe the specifics of each callback
    84  * such as the context in which it is invoked and various constraints.
    85  */
    86 
    8740typedef struct {
    8841        /**
     
    10659         * Invoked on:          all forgotten calls
    10760         */     
    108         int (* request_forget)(call_t *);
     61        void (* request_forget)(call_t *);
    10962
    11063        /**
     
    11467         * Caller alive:        no guarantee
    11568         * Races with:          request_forget()
    116          * Invoked on:          all calls delivered to the callee
     69         * Invoked on:          calls that are received by the callee
    11770         */     
    11871        int (* request_process)(call_t *, answerbox_t *);
     
    12780         * Invoked on:          all forgotten calls
    12881         */
    129         int (* answer_cleanup)(call_t *, ipc_data_t *);
     82        void (* answer_cleanup)(call_t *, ipc_data_t *);
    13083
    13184        /**
     
    154107
    155108extern int null_request_preprocess(call_t *, phone_t *);
    156 extern int null_request_forget(call_t *);
     109extern void null_request_forget(call_t *);
    157110extern int null_request_process(call_t *, answerbox_t *);
    158 extern int null_answer_cleanup(call_t *, ipc_data_t *);
     111extern void null_answer_cleanup(call_t *, ipc_data_t *);
    159112extern int null_answer_preprocess(call_t *, ipc_data_t *);
    160113extern int null_answer_process(call_t *);
Note: See TracChangeset for help on using the changeset viewer.