#pragma once

/*
 * BTF enum lookups for SCX constants. Keep this table in sync
 * with rust/scx_utils/src/enums.rs.
 */

#define SCX_ENUM_INIT(skel) do { \
	SCX_ENUM_SET(skel, scx_public_consts, SCX_OPS_NAME_LEN); \
	SCX_ENUM_SET(skel, scx_public_consts, SCX_SLICE_DFL); \
	SCX_ENUM_SET(skel, scx_public_consts, SCX_SLICE_INF); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_ONLINE); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_CAN_STOP_TICK); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_BAL_PENDING); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_BAL_KEEP); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_BYPASSING); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_CLK_VALID); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_IN_WAKEUP); \
	SCX_ENUM_SET(skel, scx_rq_flags, SCX_RQ_IN_BALANCE); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_FLAG_BUILTIN); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_FLAG_LOCAL_ON); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_INVALID); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_GLOBAL); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_LOCAL); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_LOCAL_ON); \
	SCX_ENUM_SET(skel, scx_dsq_id_flags, SCX_DSQ_LOCAL_CPU_MASK); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_QUEUED); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_RESET_RUNNABLE_AT); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_DEQD_FOR_SLEEP); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_SUB_INIT); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_IMMED); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_STATE_SHIFT); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_STATE_BITS); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_STATE_MASK); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_CURSOR); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_NONE); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_INIT); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_READY); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_ENABLED); \
	SCX_ENUM_SET(skel, scx_ent_flags, SCX_TASK_NR_STATES); \
	SCX_ENUM_SET(skel, scx_ent_dsq_flags, SCX_TASK_DSQ_ON_PRIQ); \
	SCX_ENUM_SET(skel, scx_kick_flags, SCX_KICK_IDLE); \
	SCX_ENUM_SET(skel, scx_kick_flags, SCX_KICK_PREEMPT); \
	SCX_ENUM_SET(skel, scx_kick_flags, SCX_KICK_WAIT); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_WAKEUP); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_HEAD); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_PREEMPT); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_IMMED); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_REENQ); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_LAST); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_CLEAR_OPSS); \
	SCX_ENUM_SET(skel, scx_enq_flags, SCX_ENQ_DSQ_PRIQ); \
	SCX_ENUM_SET(skel, scx_deq_flags, SCX_DEQ_SCHED_CHANGE); \
} while (0)
