Codes for the macOS scheduler's DBG_MACH_SCHED subclass (kdebug class MACH, subclass 0x40) aren't documented anywhere on the web even an LLM couldn't find it after a try-hard session, despite showing up constantly in Instruments' Thread State Trace and raw kdebug captures. This table is a plain transcription of the definitions in sys/kdebug.h as shipped in the Xcode/macOS SDK, and part of Apple's XNU kernel sources released under the Apple Public Source License 2.0.
Local path in my environment and probably in yours too (as of today, because you know, apple...):
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/sys/kdebug.h
Current upstream source: github.com/apple-oss-distributions/xnu
I sincerely wanted to let the web have it publicly and search engines index it because sometimes it is really hard to find what we are looking for in 'the mess we are in'.
Also, still surprised why even with the quoted search, google didn't bring the original file