增加cpu占用率支持

This commit is contained in:
zhangzheng
2025-02-05 14:44:49 +08:00
parent 8e2e588298
commit a1184c8e95
22 changed files with 372 additions and 156 deletions

View File

@@ -6,9 +6,12 @@
#include <u_rpc_svr.h>
#include <u_rpc_buf.h>
#include <u_hd_man.h>
#include <rpc_prot.h>
#include <string.h>
#include <errno.h>
#define MAGIC_NS_USERPID 0xbabababa
int fast_ipc_setsp(int i, void *stack);
#define FAST_IPC_MAIN_STACK_SIZE 512
@@ -57,6 +60,16 @@ static msg_tag_t process_ipc(int j, umword_t obj, long tag)
ret_tag = msg_tag_init4(0, 0, 0, -EACCES);
goto end;
}
if (svr_obj == (void *)MAGIC_NS_USERPID)
{
/*获取ns的user id*/
svr_obj = meta_find_svr_obj(NS_PROT);
}
if (svr_obj == NULL)
{
ret_tag = msg_tag_init4(0, 0, 0, -EACCES);
goto end;
}
if (svr_obj->dispatch)
{
ret_tag = svr_obj->dispatch(svr_obj, msg_tag_init(tag), msg);