浏览代码

core: rpc - adding rpc_cb_ctx_t

 - rpc_cb_ctx_t is a convenient way of packing an rpc
    callback (rpc_function_t) parameters and it's not
    used/needed by the rpc api/interface.
Ovidiu Sas 15 年之前
父节点
当前提交
e5e03e8589
共有 1 个文件被更改,包括 12 次插入0 次删除
  1. 12 0
      rpc.h

+ 12 - 0
rpc.h

@@ -95,6 +95,18 @@ typedef struct rpc_delayed_ctx{
 
 typedef void (*rpc_function_t)(rpc_t* rpc, void* ctx);
 
+/*
+ * RPC callback context.
+ *
+ * Defines a convenient way of packing an rpc callback
+ * (rpc_function_t) parameters and it's not used/needed
+ * by the rpc api/interface.
+ */
+typedef struct rpc_cb_ctx {
+	rpc_t *rpc;
+	void *c;
+} rpc_cb_ctx_t;
+
 
 /*
  * Remote Procedure Call Export