diff options
Diffstat (limited to 'kern/syscall_thread.c')
| -rw-r--r-- | kern/syscall_thread.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kern/syscall_thread.c b/kern/syscall_thread.c index d8984b0..2cb62d9 100644 --- a/kern/syscall_thread.c +++ b/kern/syscall_thread.c @@ -63,6 +63,10 @@ void sys_thread_fork_real(stack_frame_t* f) { yf->eflags = DEFAULT_EFLAGS; yf->raddr = (reg_t)return_to_user; + t->pts = get_current()->pts; + mutex_lock(&t->pts->lock); + t->pts->refcount++; + mutex_unlock(&t->pts->lock); t->process = p; mutex_lock(&p->refcount_lock); p->refcount++; |
