Deleted Added
full compact
sys_process.c (31138) sys_process.c (31564)
1/*
2 * Copyright (c) 1994, Sean Eric Fagan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
1/*
2 * Copyright (c) 1994, Sean Eric Fagan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 14 unchanged lines hidden (view full) ---

23 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29 * SUCH DAMAGE.
30 *
31 * $Id: sys_process.c,v 1.31 1997/11/06 19:29:22 phk Exp $
31 * $Id: sys_process.c,v 1.32 1997/11/12 12:28:12 tegge Exp $
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/sysproto.h>
37#include <sys/proc.h>
38#include <sys/vnode.h>
39#include <sys/ptrace.h>

--- 458 unchanged lines hidden (view full) ---

498}
499
500int
501trace_req(p)
502 struct proc *p;
503{
504 return 1;
505}
32 */
33
34#include <sys/param.h>
35#include <sys/systm.h>
36#include <sys/sysproto.h>
37#include <sys/proc.h>
38#include <sys/vnode.h>
39#include <sys/ptrace.h>

--- 458 unchanged lines hidden (view full) ---

498}
499
500int
501trace_req(p)
502 struct proc *p;
503{
504 return 1;
505}
506
507/*
508 * stopevent()
509 * Stop a process because of a procfs event;
510 * stay stopped until p->p_step is cleared
511 * (cleared by PIOCCONT in procfs).
512 */
513
514void
515stopevent(struct proc *p, unsigned int event, unsigned int val) {
516 p->p_step = 1;
517
518 do {
519 p->p_xstat = val;
520 p->p_stype = event; /* Which event caused the stop? */
521 wakeup(&p->p_stype); /* Wake up any PIOCWAIT'ing procs */
522 tsleep(&p->p_step, PWAIT, "stopevent", 0);
523 } while (p->p_step);
524}