소스 검색

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