Page MenuHomeFreeBSD

D35842.diff
No OneTemporary

D35842.diff

diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c
--- a/sys/kern/kern_event.c
+++ b/sys/kern/kern_event.c
@@ -107,7 +107,7 @@
static void kqueue_release(struct kqueue *kq, int locked);
static void kqueue_destroy(struct kqueue *kq);
static void kqueue_drain(struct kqueue *kq, struct thread *td);
-static int kqueue_expand(struct kqueue *kq, struct filterops *fops,
+static int kqueue_expand(struct kqueue *kq, const struct filterops *fops,
uintptr_t ident, int mflag);
static void kqueue_task(void *arg, int pending);
static int kqueue_scan(struct kqueue *kq, int maxevents,
@@ -115,7 +115,7 @@
const struct timespec *timeout,
struct kevent *keva, struct thread *td);
static void kqueue_wakeup(struct kqueue *kq);
-static struct filterops *kqueue_fo_find(int filt);
+static const struct filterops *kqueue_fo_find(int filt);
static void kqueue_fo_release(int filt);
struct g_kevent_args;
static int kern_kevent_generic(struct thread *td,
@@ -341,10 +341,9 @@
* Table for all system-defined filters.
*/
static struct mtx filterops_lock;
-MTX_SYSINIT(kqueue_filterops, &filterops_lock, "protect sysfilt_ops",
- MTX_DEF);
+MTX_SYSINIT(kqueue_filterops, &filterops_lock, "protect sysfilt_ops", MTX_DEF);
static struct {
- struct filterops *for_fop;
+ const struct filterops *for_fop;
int for_nolock;
int for_refcnt;
} sysfilt_ops[EVFILT_SYSCOUNT] = {
@@ -1400,7 +1399,7 @@
}
int
-kqueue_add_filteropts(int filt, struct filterops *filtops)
+kqueue_add_filteropts(int filt, const struct filterops *filtops)
{
int error;
@@ -1448,7 +1447,7 @@
return error;
}
-static struct filterops *
+static const struct filterops *
kqueue_fo_find(int filt)
{
@@ -1491,7 +1490,7 @@
kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td,
int mflag)
{
- struct filterops *fops;
+ const struct filterops *fops;
struct file *fp;
struct knote *kn, *tkn;
struct knlist *knl;
@@ -1820,7 +1819,7 @@
* Return 0 on success (or no work necessary), return errno on failure.
*/
static int
-kqueue_expand(struct kqueue *kq, struct filterops *fops, uintptr_t ident,
+kqueue_expand(struct kqueue *kq, const struct filterops *fops, uintptr_t ident,
int mflag)
{
struct klist *list, *tmp_knhash, *to_free;
diff --git a/sys/sys/event.h b/sys/sys/event.h
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -308,7 +308,7 @@
struct aioliojob *p_lio; /* LIO job pointer */
void *p_v; /* generic other pointer */
} kn_ptr;
- struct filterops *kn_fop;
+ const struct filterops *kn_fop;
#define kn_id kn_kevent.ident
#define kn_filter kn_kevent.filter
@@ -350,7 +350,7 @@
void knote_fdclose(struct thread *p, int fd);
int kqfd_register(int fd, struct kevent *kev, struct thread *p,
int mflag);
-int kqueue_add_filteropts(int filt, struct filterops *filtops);
+int kqueue_add_filteropts(int filt, const struct filterops *filtops);
int kqueue_del_filteropts(int filt);
void kqueue_drain_schedtask(void);

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 3, 2:00 AM (21 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13342343
Default Alt Text
D35842.diff (2 KB)

Event Timeline