Deleted Added
full compact
procfs_ioctl.c (113618) procfs_ioctl.c (123247)
1/*-
2 * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav
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

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

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
1/*-
2 * Copyright (c) 2001 Dag-Erling Co�dan Sm�rgrav
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

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

20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 *
28 * $FreeBSD: head/sys/fs/procfs/procfs_ioctl.c 113618 2003-04-17 22:13:46Z jhb $
28 * $FreeBSD: head/sys/fs/procfs/procfs_ioctl.c 123247 2003-12-07 17:40:00Z des $
29 */
30
31#include <sys/param.h>
32#include <sys/lock.h>
33#include <sys/mutex.h>
34#include <sys/pioctl.h>
35#include <sys/proc.h>
36#include <sys/signalvar.h>

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

107 p->p_step = 0;
108 wakeup(&p->p_step);
109#endif
110 break;
111 default:
112 error = (ENOTTY);
113 }
114 PROC_UNLOCK(p);
29 */
30
31#include <sys/param.h>
32#include <sys/lock.h>
33#include <sys/mutex.h>
34#include <sys/pioctl.h>
35#include <sys/proc.h>
36#include <sys/signalvar.h>

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

107 p->p_step = 0;
108 wakeup(&p->p_step);
109#endif
110 break;
111 default:
112 error = (ENOTTY);
113 }
114 PROC_UNLOCK(p);
115
115
116 return (error);
117}
118
119/*
120 * Clean up on last close
121 */
122int
123procfs_close(PFS_CLOSE_ARGS)
124{
125 if (p != NULL && (p->p_pfsflags & PF_LINGER) == 0) {
126 PROC_LOCK_ASSERT(p, MA_OWNED);
127 p->p_pfsflags = 0;
128 p->p_stops = 0;
129 p->p_step = 0;
130 wakeup(&p->p_step);
131 }
132 return (0);
133}
116 return (error);
117}
118
119/*
120 * Clean up on last close
121 */
122int
123procfs_close(PFS_CLOSE_ARGS)
124{
125 if (p != NULL && (p->p_pfsflags & PF_LINGER) == 0) {
126 PROC_LOCK_ASSERT(p, MA_OWNED);
127 p->p_pfsflags = 0;
128 p->p_stops = 0;
129 p->p_step = 0;
130 wakeup(&p->p_step);
131 }
132 return (0);
133}