X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=vlib%2Fvlib%2Fthreads.h;h=589d1f3a1ec2228dcc32ee9fb182dff484a90cd5;hb=1e7658340ac4cba20defba056c2e13ec0e1a0a69;hp=4283b70a61d31b3e284354f82eabc44c7608f4e9;hpb=82bf7cddd26b626d3e2d7e3337d52cf2c1b83a22;p=vpp.git diff --git a/vlib/vlib/threads.h b/vlib/vlib/threads.h index 4283b70a61d..589d1f3a1ec 100644 --- a/vlib/vlib/threads.h +++ b/vlib/vlib/threads.h @@ -16,6 +16,7 @@ #define included_vlib_threads_h #include +#include vlib_main_t **vlib_mains; @@ -257,6 +258,21 @@ typedef struct vlib_efd_t u8 pad; } vlib_efd_t; +#define foreach_sched_policy \ + _(SCHED_OTHER, OTHER, "other") \ + _(SCHED_BATCH, BATCH, "batch") \ + _(SCHED_IDLE, IDLE, "idle") \ + _(SCHED_FIFO, FIFO, "fifo") \ + _(SCHED_RR, RR, "rr") + +typedef enum +{ +#define _(v,f,s) SCHED_POLICY_##f = v, + foreach_sched_policy +#undef _ + SCHED_POLICY_N, +} sched_policy_t; + typedef struct { /* Link list of registrations, built by constructors */ @@ -314,6 +330,12 @@ typedef struct /* worker thread initialization barrier */ volatile u32 worker_thread_release; + /* scheduling policy */ + u32 sched_policy; + + /* scheduling policy priority */ + u32 sched_priority; + } vlib_thread_main_t; vlib_thread_main_t vlib_thread_main;