sys_eventfd.c (f28526e9466cd60ed33053e922238ba1c9040341) sys_eventfd.c (ef9ffb8594eee294334ced627755bf5b46b48f9f)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2014 Dmitry Chagin <dchagin@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

58static fo_rdwr_t eventfd_write;
59static fo_ioctl_t eventfd_ioctl;
60static fo_poll_t eventfd_poll;
61static fo_kqfilter_t eventfd_kqfilter;
62static fo_stat_t eventfd_stat;
63static fo_close_t eventfd_close;
64static fo_fill_kinfo_t eventfd_fill_kinfo;
65
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause
3 *
4 * Copyright (c) 2014 Dmitry Chagin <dchagin@FreeBSD.org>
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

58static fo_rdwr_t eventfd_write;
59static fo_ioctl_t eventfd_ioctl;
60static fo_poll_t eventfd_poll;
61static fo_kqfilter_t eventfd_kqfilter;
62static fo_stat_t eventfd_stat;
63static fo_close_t eventfd_close;
64static fo_fill_kinfo_t eventfd_fill_kinfo;
65
66static struct fileops eventfdops = {
66static const struct fileops eventfdops = {
67 .fo_read = eventfd_read,
68 .fo_write = eventfd_write,
69 .fo_truncate = invfo_truncate,
70 .fo_ioctl = eventfd_ioctl,
71 .fo_poll = eventfd_poll,
72 .fo_kqfilter = eventfd_kqfilter,
73 .fo_stat = eventfd_stat,
74 .fo_close = eventfd_close,

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

79 .fo_cmp = file_kcmp_generic,
80 .fo_flags = DFLAG_PASSABLE
81};
82
83static void filt_eventfddetach(struct knote *kn);
84static int filt_eventfdread(struct knote *kn, long hint);
85static int filt_eventfdwrite(struct knote *kn, long hint);
86
67 .fo_read = eventfd_read,
68 .fo_write = eventfd_write,
69 .fo_truncate = invfo_truncate,
70 .fo_ioctl = eventfd_ioctl,
71 .fo_poll = eventfd_poll,
72 .fo_kqfilter = eventfd_kqfilter,
73 .fo_stat = eventfd_stat,
74 .fo_close = eventfd_close,

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

79 .fo_cmp = file_kcmp_generic,
80 .fo_flags = DFLAG_PASSABLE
81};
82
83static void filt_eventfddetach(struct knote *kn);
84static int filt_eventfdread(struct knote *kn, long hint);
85static int filt_eventfdwrite(struct knote *kn, long hint);
86
87static struct filterops eventfd_rfiltops = {
87static const struct filterops eventfd_rfiltops = {
88 .f_isfd = 1,
89 .f_detach = filt_eventfddetach,
90 .f_event = filt_eventfdread
91};
92
88 .f_isfd = 1,
89 .f_detach = filt_eventfddetach,
90 .f_event = filt_eventfdread
91};
92
93static struct filterops eventfd_wfiltops = {
93static const struct filterops eventfd_wfiltops = {
94 .f_isfd = 1,
95 .f_detach = filt_eventfddetach,
96 .f_event = filt_eventfdwrite
97};
98
99struct eventfd {
100 eventfd_t efd_count;
101 uint32_t efd_flags;

--- 244 unchanged lines hidden ---
94 .f_isfd = 1,
95 .f_detach = filt_eventfddetach,
96 .f_event = filt_eventfdwrite
97};
98
99struct eventfd {
100 eventfd_t efd_count;
101 uint32_t efd_flags;

--- 244 unchanged lines hidden ---