Page MenuHomeFreeBSD

D35842.id108274.diff
No OneTemporary

D35842.id108274.diff

Index: sys/kern/kern_event.c
===================================================================
--- sys/kern/kern_event.c
+++ sys/kern/kern_event.c
@@ -108,7 +108,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,
@@ -116,7 +116,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,
@@ -342,10 +342,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] = {
@@ -1388,7 +1387,7 @@
}
int
-kqueue_add_filteropts(int filt, struct filterops *filtops)
+kqueue_add_filteropts(int filt, const struct filterops *filtops)
{
int error;
@@ -1436,7 +1435,7 @@
return error;
}
-static struct filterops *
+static const struct filterops *
kqueue_fo_find(int filt)
{
@@ -1479,7 +1478,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;
@@ -1813,7 +1812,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;
Index: sys/sys/event.h
===================================================================
--- sys/sys/event.h
+++ sys/sys/event.h
@@ -305,7 +305,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
@@ -348,7 +348,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
Wed, Oct 2, 7:22 AM (2 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
13115087
Default Alt Text
D35842.id108274.diff (2 KB)

Event Timeline