del old ipc code && sema support timeout
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
* @brief 该宏用于生成一个客户端的调用函数(传递一个参数)
|
||||
*
|
||||
*/
|
||||
#define RPC_GENERATION_CALL1(is_fast, struct_type, prot, op, func_name, cli_type0, svr_type0, dir0, rpc_type0, name0) \
|
||||
#define RPC_GENERATION_CALL1(struct_type, prot, op, func_name, cli_type0, svr_type0, dir0, rpc_type0, name0) \
|
||||
msg_tag_t struct_type##_##func_name##_call(obj_handler_t hd, cli_type0 *var0) \
|
||||
{ \
|
||||
void *buf; \
|
||||
@@ -32,16 +32,8 @@
|
||||
PRC_CLI_FILL_MAP_BUF(rpc_type0, cli_type0, var0, dir0, (uint8_t *)msg_ipc->map_buf, off_buf); \
|
||||
/*msg_tag_t tag = dispatch_test(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), 0), msg_ipc);*/ \
|
||||
msg_tag_t tag; \
|
||||
if (is_fast) \
|
||||
{ \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
tag = thread_ipc_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), hd, \
|
||||
ipc_timeout_create2(0, 0)); \
|
||||
} \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
if (msg_tag_get_val(tag) < 0) \
|
||||
{ \
|
||||
return tag; \
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define RPC_GENERATION_CALL2(is_fast, struct_type, prot, op, func_name, \
|
||||
#define RPC_GENERATION_CALL2(struct_type, prot, op, func_name, \
|
||||
cli_type0, svr_type0, dir0, rpc_type0, name0, \
|
||||
cli_type1, svr_type1, dir1, rpc_type1, name1) \
|
||||
msg_tag_t struct_type##_##func_name##_call(obj_handler_t hd, cli_type0 *var0, cli_type1 *var1) \
|
||||
@@ -33,16 +33,8 @@
|
||||
PRC_CLI_FILL_MAP_BUF(rpc_type1, cli_type1, var1, dir1, (uint8_t *)msg_ipc->map_buf, off_buf); \
|
||||
/*msg_tag_t tag = dispatch_test(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), 0), msg_ipc); */ \
|
||||
msg_tag_t tag; \
|
||||
if (is_fast) \
|
||||
{ \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
tag = thread_ipc_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), hd, \
|
||||
ipc_timeout_create2(0, 0)); \
|
||||
} \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
if (msg_tag_get_val(tag) < 0) \
|
||||
{ \
|
||||
return tag; \
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define RPC_GENERATION_CALL3(is_fast, struct_type, prot, op, func_name, \
|
||||
#define RPC_GENERATION_CALL3(struct_type, prot, op, func_name, \
|
||||
cli_type0, svr_type0, dir0, rpc_type0, name0, \
|
||||
cli_type1, svr_type1, dir1, rpc_type1, name1, \
|
||||
cli_type2, svr_type2, dir2, rpc_type2, name2) \
|
||||
@@ -36,16 +36,8 @@
|
||||
PRC_CLI_FILL_MAP_BUF(rpc_type2, cli_type2, var2, dir2, (uint8_t *)msg_ipc->map_buf, off_buf); \
|
||||
/*msg_tag_t tag = dispatch_test(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), 0), msg_ipc); */ \
|
||||
msg_tag_t tag; \
|
||||
if (is_fast) \
|
||||
{ \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
tag = thread_ipc_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), hd, \
|
||||
ipc_timeout_create2(0, 0)); \
|
||||
} \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
if (msg_tag_get_val(tag) < 0) \
|
||||
{ \
|
||||
return tag; \
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define RPC_GENERATION_CALL4(is_fast, struct_type, prot, op, func_name, \
|
||||
#define RPC_GENERATION_CALL4(struct_type, prot, op, func_name, \
|
||||
cli_type0, svr_type0, dir0, rpc_type0, name0, \
|
||||
cli_type1, svr_type1, dir1, rpc_type1, name1, \
|
||||
cli_type2, svr_type2, dir2, rpc_type2, name2, \
|
||||
@@ -39,16 +39,8 @@
|
||||
PRC_CLI_FILL_MAP_BUF(rpc_type3, cli_type3, var3, dir3, (uint8_t *)msg_ipc->map_buf, off_buf); \
|
||||
/*msg_tag_t tag = dispatch_test(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), 0), msg_ipc); */ \
|
||||
msg_tag_t tag; \
|
||||
if (is_fast) \
|
||||
{ \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
tag = thread_ipc_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), hd, \
|
||||
ipc_timeout_create2(0, 0)); \
|
||||
} \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
if (msg_tag_get_val(tag) < 0) \
|
||||
{ \
|
||||
return tag; \
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define RPC_GENERATION_CALL5(is_fast, struct_type, prot, op, func_name, \
|
||||
#define RPC_GENERATION_CALL5(struct_type, prot, op, func_name, \
|
||||
cli_type0, svr_type0, dir0, rpc_type0, name0, \
|
||||
cli_type1, svr_type1, dir1, rpc_type1, name1, \
|
||||
cli_type2, svr_type2, dir2, rpc_type2, name2, \
|
||||
@@ -42,16 +42,8 @@
|
||||
PRC_CLI_FILL_MAP_BUF(rpc_type4, cli_type4, var4, dir4, (uint8_t *)msg_ipc->map_buf, off_buf); \
|
||||
/*msg_tag_t tag = dispatch_test(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), 0), msg_ipc); */ \
|
||||
msg_tag_t tag; \
|
||||
if (is_fast) \
|
||||
{ \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
tag = thread_ipc_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), hd, \
|
||||
ipc_timeout_create2(0, 0)); \
|
||||
} \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
if (msg_tag_get_val(tag) < 0) \
|
||||
{ \
|
||||
return tag; \
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <errno.h>
|
||||
|
||||
#define RPC_GENERATION_CALL6(is_fast, struct_type, prot, op, func_name, \
|
||||
#define RPC_GENERATION_CALL6(struct_type, prot, op, func_name, \
|
||||
cli_type0, svr_type0, dir0, rpc_type0, name0, \
|
||||
cli_type1, svr_type1, dir1, rpc_type1, name1, \
|
||||
cli_type2, svr_type2, dir2, rpc_type2, name2, \
|
||||
@@ -45,16 +45,8 @@
|
||||
PRC_CLI_FILL_MAP_BUF(rpc_type5, cli_type5, var5, dir5, (uint8_t *)msg_ipc->map_buf, off_buf); \
|
||||
/*msg_tag_t tag = dispatch_test(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), 0), msg_ipc); */ \
|
||||
msg_tag_t tag; \
|
||||
if (is_fast) \
|
||||
{ \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
tag = thread_ipc_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), hd, \
|
||||
ipc_timeout_create2(0, 0)); \
|
||||
} \
|
||||
tag = thread_ipc_fast_call(msg_tag_init4(0, ROUND_UP(off, WORD_BYTES), ROUND_UP(off_buf, WORD_BYTES), prot), \
|
||||
hd, 1111, 2222, 3333); \
|
||||
if (msg_tag_get_val(tag) < 0) \
|
||||
{ \
|
||||
return tag; \
|
||||
|
||||
@@ -36,7 +36,7 @@ rpc_svr_obj_t *meta_find_svr_obj(umword_t prot);
|
||||
int meta_reg_svr_obj(rpc_svr_obj_t *svr_obj, umword_t prot);
|
||||
int meta_reg_svr_obj_raw(meta_t *meta, rpc_svr_obj_t *svr_obj, umword_t prot);
|
||||
int rpc_creaite_bind_ipc(obj_handler_t th, void *obj, obj_handler_t *ipc_hd);
|
||||
void rpc_loop(void);
|
||||
#if 0
|
||||
void rpc_loop(void);
|
||||
int rpc_mtd_loop(void);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user