Return the proc* from threadpin

上级 2a0a93e3
......@@ -190,7 +190,7 @@ void userinit(void);
int wait(void);
void yield(void);
struct proc* threadalloc(void (*fn)(void*), void *arg);
void threadpin(void (*fn)(void*), void *arg, const char *name, int cpu);
struct proc* threadpin(void (*fn)(void*), void *arg, const char *name, int cpu);
// prof.c
extern int profenable;
......
......@@ -538,7 +538,7 @@ threadalloc(void (*fn)(void *), void *arg)
return p;
}
void
struct proc*
threadpin(void (*fn)(void*), void *arg, const char *name, int cpu)
{
struct proc *p;
......@@ -553,4 +553,5 @@ threadpin(void (*fn)(void*), void *arg, const char *name, int cpu)
acquire(&p->lock);
addrun(p);
release(&p->lock);
return p;
}
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论