| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: proc.h,v 1.322 2015/06/19 10:18:19 martin Exp $ */ | | 1 | /* $NetBSD: proc.h,v 1.323 2015/09/24 14:33:31 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Andrew Doran. | | 8 | * by Andrew Doran. |
9 | * | | 9 | * |
10 | * Redistribution and use in source and binary forms, with or without | | 10 | * Redistribution and use in source and binary forms, with or without |
11 | * modification, are permitted provided that the following conditions | | 11 | * modification, are permitted provided that the following conditions |
12 | * are met: | | 12 | * are met: |
13 | * 1. Redistributions of source code must retain the above copyright | | 13 | * 1. Redistributions of source code must retain the above copyright |
14 | * notice, this list of conditions and the following disclaimer. | | 14 | * notice, this list of conditions and the following disclaimer. |
| @@ -448,26 +448,27 @@ extern u_int nprocs; /* Current number | | | @@ -448,26 +448,27 @@ extern u_int nprocs; /* Current number |
448 | extern int maxproc; /* Max number of procs */ | | 448 | extern int maxproc; /* Max number of procs */ |
449 | #define vmspace_kernel() (proc0.p_vmspace) | | 449 | #define vmspace_kernel() (proc0.p_vmspace) |
450 | | | 450 | |
451 | extern kmutex_t *proc_lock; | | 451 | extern kmutex_t *proc_lock; |
452 | extern struct proclist allproc; /* List of all processes */ | | 452 | extern struct proclist allproc; /* List of all processes */ |
453 | extern struct proclist zombproc; /* List of zombie processes */ | | 453 | extern struct proclist zombproc; /* List of zombie processes */ |
454 | | | 454 | |
455 | extern struct proc *initproc; /* Process slots for init, pager */ | | 455 | extern struct proc *initproc; /* Process slots for init, pager */ |
456 | | | 456 | |
457 | extern const struct proclist_desc proclists[]; | | 457 | extern const struct proclist_desc proclists[]; |
458 | | | 458 | |
459 | extern struct pool ptimer_pool; /* Memory pool for ptimers */ | | 459 | extern struct pool ptimer_pool; /* Memory pool for ptimers */ |
460 | | | 460 | |
| | | 461 | int proc_find_locked(struct lwp *, struct proc **, pid_t); |
461 | proc_t * proc_find_raw(pid_t); | | 462 | proc_t * proc_find_raw(pid_t); |
462 | proc_t * proc_find(pid_t); /* Find process by ID */ | | 463 | proc_t * proc_find(pid_t); /* Find process by ID */ |
463 | struct pgrp * pgrp_find(pid_t); /* Find process group by ID */ | | 464 | struct pgrp * pgrp_find(pid_t); /* Find process group by ID */ |
464 | | | 465 | |
465 | void procinit(void); | | 466 | void procinit(void); |
466 | void procinit_sysctl(void); | | 467 | void procinit_sysctl(void); |
467 | int proc_enterpgrp(struct proc *, pid_t, pid_t, bool); | | 468 | int proc_enterpgrp(struct proc *, pid_t, pid_t, bool); |
468 | void proc_leavepgrp(struct proc *); | | 469 | void proc_leavepgrp(struct proc *); |
469 | void proc_sesshold(struct session *); | | 470 | void proc_sesshold(struct session *); |
470 | void proc_sessrele(struct session *); | | 471 | void proc_sessrele(struct session *); |
471 | void fixjobc(struct proc *, struct pgrp *, int); | | 472 | void fixjobc(struct proc *, struct pgrp *, int); |
472 | | | 473 | |
473 | int tsleep(wchan_t, pri_t, const char *, int); | | 474 | int tsleep(wchan_t, pri_t, const char *, int); |