Move KQ scheduler flags to Non kernel

This commit is contained in:
Oscar Tsalapatis 2019-08-02 16:34:03 -04:00
parent 2fdea6945b
commit b4d0670a1f
2 changed files with 16 additions and 28 deletions

View File

@ -275,20 +275,6 @@ struct filterops {
void (*f_touch)(struct knote *kn, struct kevent *kev, u_long type); 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 * 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 * unlocked. If the KN_SCAN flag is not set, a thread can only set
@ -404,4 +390,20 @@ __END_DECLS
#endif /* !_KERNEL */ #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_ */ #endif /* !_SYS_EVENT_H_ */

View File

@ -25,20 +25,6 @@
#include <sys/sysctl.h> #include <sys/sysctl.h>
#include <pthread_np.h> #include <pthread_np.h>
/*
* 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 //#define TEST_DEBUG
struct thread_info { struct thread_info {