From b4d0670a1f3d9099f32a20e062dd5d2d059c00d6 Mon Sep 17 00:00:00 2001 From: Oscar Tsalapatis Date: Fri, 2 Aug 2019 16:34:03 -0400 Subject: [PATCH] Move KQ scheduler flags to Non kernel --- sys/sys/event.h | 30 +++++++++++++++-------------- tests/sys/kqueue/libkqueue/read_m.c | 14 -------------- 2 files changed, 16 insertions(+), 28 deletions(-) diff --git a/sys/sys/event.h b/sys/sys/event.h index 409abb121db1..7232e952a987 100644 --- a/sys/sys/event.h +++ b/sys/sys/event.h @@ -275,20 +275,6 @@ struct filterops { void (*f_touch)(struct knote *kn, struct kevent *kev, u_long type); }; -/* - * The ioctl to set multithreaded mode - */ -#define FKQMULTI _IOW('f', 89, int) - -/* - * KQ scheduler flags - */ -#define KQ_SCHED_QUEUE 0x01 /* make kq affinitize the knote depending on the first cpu it's scheduled to */ -#define KQ_SCHED_QUEUE_CPU 0x02 /* make kq affinitize the knote depending on the runtime cpu it's scheduled to */ -#define KQ_SCHED_WORK_STEALING 0x04 -#define KQ_SCHED_BEST_OF_N 0x08 -#define KQ_SCHED_GREEDY 0x16 - /* * An in-flux knote cannot be dropped from its kq while the kq is * unlocked. If the KN_SCAN flag is not set, a thread can only set @@ -404,4 +390,20 @@ __END_DECLS #endif /* !_KERNEL */ + +/* + * The ioctl to set multithreaded mode + */ +#define FKQMULTI _IOW('f', 89, int) + +/* + * KQ scheduler flags + */ +#define KQ_SCHED_WORK_STEALING 0x01 + +#define KQ_SCHED_QUEUE 0x02 /* make kq affinitize the knote depending on the first cpu it's scheduled to */ +/* QUEUE_CPU = 0x04 | QUEUE */ +#define KQ_SCHED_QUEUE_CPU 0x06 /* make kq affinitize the knote depending on the runtime cpu it's scheduled to */ +#define KQ_SCHED_BEST_OF_N 0x08 + #endif /* !_SYS_EVENT_H_ */ diff --git a/tests/sys/kqueue/libkqueue/read_m.c b/tests/sys/kqueue/libkqueue/read_m.c index dc09df0ae3a3..932d6b15c1b4 100644 --- a/tests/sys/kqueue/libkqueue/read_m.c +++ b/tests/sys/kqueue/libkqueue/read_m.c @@ -25,20 +25,6 @@ #include #include -/* - * The ioctl to set multithreaded mode - */ -#define FKQMULTI _IOW('f', 89, int) - -/* - * KQ scheduler flags - */ -#define KQ_SCHED_QUEUE 0x01 /* make kq affinitize the knote depending on the first cpu it's scheduled to */ -#define KQ_SCHED_QUEUE_CPU 0x02 /* make kq affinitize the knote depending on the runtime cpu it's scheduled to */ -#define KQ_SCHED_WORK_STEALING 0x04 -#define KQ_SCHED_BEST_OF_N 0x08 -#define KQ_SCHED_GREEDY 0x16 - //#define TEST_DEBUG struct thread_info {