sys_procdesc.c (f006524d6d696cc2a10b9e90a9a6ea412f1839eb) sys_procdesc.c (ef9ffb8594eee294334ced627755bf5b46b48f9f)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2009, 2016 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * This software was developed at the University of Cambridge Computer
8 * Laboratory with support from a grant from Google, Inc.

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

91
92static fo_poll_t procdesc_poll;
93static fo_kqfilter_t procdesc_kqfilter;
94static fo_stat_t procdesc_stat;
95static fo_close_t procdesc_close;
96static fo_fill_kinfo_t procdesc_fill_kinfo;
97static fo_cmp_t procdesc_cmp;
98
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2009, 2016 Robert N. M. Watson
5 * All rights reserved.
6 *
7 * This software was developed at the University of Cambridge Computer
8 * Laboratory with support from a grant from Google, Inc.

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

91
92static fo_poll_t procdesc_poll;
93static fo_kqfilter_t procdesc_kqfilter;
94static fo_stat_t procdesc_stat;
95static fo_close_t procdesc_close;
96static fo_fill_kinfo_t procdesc_fill_kinfo;
97static fo_cmp_t procdesc_cmp;
98
99static struct fileops procdesc_ops = {
99static const struct fileops procdesc_ops = {
100 .fo_read = invfo_rdwr,
101 .fo_write = invfo_rdwr,
102 .fo_truncate = invfo_truncate,
103 .fo_ioctl = invfo_ioctl,
104 .fo_poll = procdesc_poll,
105 .fo_kqfilter = procdesc_kqfilter,
106 .fo_stat = procdesc_stat,
107 .fo_close = procdesc_close,

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

476 if (kn->kn_fflags == 0)
477 kn->kn_flags |= EV_DROP;
478 return (1);
479 }
480
481 return (kn->kn_fflags != 0);
482}
483
100 .fo_read = invfo_rdwr,
101 .fo_write = invfo_rdwr,
102 .fo_truncate = invfo_truncate,
103 .fo_ioctl = invfo_ioctl,
104 .fo_poll = procdesc_poll,
105 .fo_kqfilter = procdesc_kqfilter,
106 .fo_stat = procdesc_stat,
107 .fo_close = procdesc_close,

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

476 if (kn->kn_fflags == 0)
477 kn->kn_flags |= EV_DROP;
478 return (1);
479 }
480
481 return (kn->kn_fflags != 0);
482}
483
484static struct filterops procdesc_kqops = {
484static const struct filterops procdesc_kqops = {
485 .f_isfd = 1,
486 .f_detach = procdesc_kqops_detach,
487 .f_event = procdesc_kqops_event,
488};
489
490static int
491procdesc_kqfilter(struct file *fp, struct knote *kn)
492{

--- 76 unchanged lines hidden ---
485 .f_isfd = 1,
486 .f_detach = procdesc_kqops_detach,
487 .f_event = procdesc_kqops_event,
488};
489
490static int
491procdesc_kqfilter(struct file *fp, struct knote *kn)
492{

--- 76 unchanged lines hidden ---