消除大部分警告
This commit is contained in:
parent
83e83abf39
commit
2aa02613db
@ -68,7 +68,6 @@ int handle_trans_fault(struct vmspace *vmspace, vaddr_t fault_addr)
|
|||||||
struct vmregion *vmr;
|
struct vmregion *vmr;
|
||||||
struct pmobject *pmo;
|
struct pmobject *pmo;
|
||||||
paddr_t pa;
|
paddr_t pa;
|
||||||
u64 offset;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -180,9 +180,7 @@ static struct page *merge_page(struct phys_mem_pool *pool, struct page *page) {
|
|||||||
list_del(&buddy->node);
|
list_del(&buddy->node);
|
||||||
pool->free_lists[page->order].nr_free -= 2;
|
pool->free_lists[page->order].nr_free -= 2;
|
||||||
// 选择左侧 page
|
// 选择左侧 page
|
||||||
struct page *t;
|
|
||||||
if (buddy < page) {
|
if (buddy < page) {
|
||||||
t = page;
|
|
||||||
page = buddy;
|
page = buddy;
|
||||||
}
|
}
|
||||||
// 增加 page 的 order
|
// 增加 page 的 order
|
||||||
|
@ -318,10 +318,7 @@ u64 sys_handle_brk(u64 addr)
|
|||||||
{
|
{
|
||||||
struct vmspace *vmspace;
|
struct vmspace *vmspace;
|
||||||
struct pmobject *pmo;
|
struct pmobject *pmo;
|
||||||
struct vmregion *vmr;
|
|
||||||
size_t len;
|
|
||||||
u64 retval;
|
u64 retval;
|
||||||
int ret;
|
|
||||||
|
|
||||||
vmspace = obj_get(current_process, VMSPACE_OBJ_ID, TYPE_VMSPACE);
|
vmspace = obj_get(current_process, VMSPACE_OBJ_ID, TYPE_VMSPACE);
|
||||||
|
|
||||||
|
@ -34,10 +34,10 @@ int stack_backtrace()
|
|||||||
|
|
||||||
// Your code here.
|
// Your code here.
|
||||||
u64 *fp, *preFp;
|
u64 *fp, *preFp;
|
||||||
fp = read_fp();
|
fp = (u64 *) read_fp();
|
||||||
// until stack end
|
// until stack end
|
||||||
while (true) {
|
while (true) {
|
||||||
preFp = *fp;
|
preFp = (u64 *) *fp;
|
||||||
// entry frame
|
// entry frame
|
||||||
if (preFp == 0)
|
if (preFp == 0)
|
||||||
break;
|
break;
|
||||||
|
@ -395,7 +395,7 @@ int sys_create_thread(u64 process_cap, u64 stack, u64 pc, u64 arg, u32 prio,
|
|||||||
int sys_set_affinity(u64 thread_cap, s32 aff)
|
int sys_set_affinity(u64 thread_cap, s32 aff)
|
||||||
{
|
{
|
||||||
struct thread *thread = NULL;
|
struct thread *thread = NULL;
|
||||||
int cpuid = smp_get_cpu_id(), ret = 0;
|
int cpuid = smp_get_cpu_id();
|
||||||
|
|
||||||
/* currently, we use -1 to represent the current thread */
|
/* currently, we use -1 to represent the current thread */
|
||||||
if (thread_cap == -1) {
|
if (thread_cap == -1) {
|
||||||
@ -424,7 +424,6 @@ int sys_get_affinity(u64 thread_cap)
|
|||||||
{
|
{
|
||||||
struct thread *thread = NULL;
|
struct thread *thread = NULL;
|
||||||
int cpuid = smp_get_cpu_id();
|
int cpuid = smp_get_cpu_id();
|
||||||
s32 aff = 0;
|
|
||||||
|
|
||||||
/* currently, we use -1 to represent the current thread */
|
/* currently, we use -1 to represent the current thread */
|
||||||
if (thread_cap == -1) {
|
if (thread_cap == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user