init支持rpc启动应用
This commit is contained in:
@@ -25,9 +25,8 @@
|
||||
#include "ipc.h"
|
||||
#include "err.h"
|
||||
#include "slist.h"
|
||||
#include <access.h>
|
||||
|
||||
#define INT_MAX 0x7fffffff
|
||||
#include "access.h"
|
||||
#include "limits.h"
|
||||
|
||||
#define FT_ADDR_NR 16 //!< 最多加锁的对象
|
||||
|
||||
@@ -70,6 +69,7 @@ typedef struct futex
|
||||
kobject_t kobj;
|
||||
futex_lock_t fl_list[FT_ADDR_NR]; //!< 存储加锁的地址
|
||||
} futex_t;
|
||||
|
||||
static futex_t futex_obj;
|
||||
static void futex_init(futex_t *ft);
|
||||
typedef struct futex_wait_item
|
||||
@@ -78,6 +78,7 @@ typedef struct futex_wait_item
|
||||
thread_t *th;
|
||||
mword_t sleep_times;
|
||||
} futex_wait_item_t;
|
||||
|
||||
static slist_head_t wait_list;
|
||||
|
||||
/**
|
||||
|
||||
@@ -159,9 +159,11 @@ static void task_syscall_func(kobject_t *kobj, syscall_prot_t sys_p, msg_tag_t i
|
||||
tag = msg_tag_init4(0, 0, 0, -EINVAL);
|
||||
break;
|
||||
}
|
||||
// ref_counter_inc(&tag_task->ref_cn);
|
||||
kobj_del_list_init(&kobj_list);
|
||||
obj_unmap(&tag_task->obj_space, vpage_create_raw(f->r[1]), &kobj_list);
|
||||
kobj_del_list_to_do(&kobj_list);
|
||||
// ref_counter_dec_and_release(&tag_task->ref_cn, &tag_task->kobj);
|
||||
spinlock_set(&tag_task->kobj.lock, status);
|
||||
tag = msg_tag_init4(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
@@ -695,7 +695,11 @@ msg_tag_t thread_do_ipc(kobject_t *kobj, entry_frame_t *f, umword_t user_id)
|
||||
msg_tag_t ret_msg;
|
||||
ipc_timeout_t ipc_tm_out = ipc_timeout_create(f->r[3]);
|
||||
|
||||
thread_ipc_recv(&ret_msg, ipc_tm_out, &f->r[1]);
|
||||
int ret = thread_ipc_recv(&ret_msg, ipc_tm_out, &f->r[1]);
|
||||
if (ret < 0)
|
||||
{
|
||||
return msg_tag_init4(0, 0, 0, ret);
|
||||
}
|
||||
return ret_msg;
|
||||
}
|
||||
case IPC_SEND:
|
||||
|
||||
Reference in New Issue
Block a user