diff options
Diffstat (limited to 'sys/kern/kern_proc.c')
-rw-r--r-- | sys/kern/kern_proc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sys/kern/kern_proc.c b/sys/kern/kern_proc.c index 8840940..8bc5680 100644 --- a/sys/kern/kern_proc.c +++ b/sys/kern/kern_proc.c @@ -39,6 +39,8 @@ #include <string.h> #include <crc32.h> +extern volatile size_t g_nthreads; + pid_t getpid(void) { @@ -114,6 +116,7 @@ proc_init(struct proc *td, struct proc *parent) /* Add to parent leafq */ TAILQ_INSERT_TAIL(&parent->leafq, td, leaf_link); atomic_inc_int(&parent->nleaves); + atomic_inc_64(&g_nthreads); td->parent = parent; td->exit_status = -1; td->cred = parent->cred; |