Has anybody gotten the __Require macro to work in DriverKit? Both the 2019 and 2020 WWDC videos show it being used. When I use it, it ends up trying to printf to stderr, which is not defined. I am using the one in DriverKit20.0 SDK.
Driverkit __Require macro
I couldn't even find the relevant header to include to get it. I had to declare it myself and include it in my sample code.
Code Block #define Require(assertion, exceptionLabel) \ do \ { \ if ( builtin_expect(!(assertion), 0) ) \ { \ goto exceptionLabel; \ } \ } while ( 0 ) #define Require_Action(assertion, exceptionLabel, action) \ do \ { \ if ( builtin_expect(!(assertion), 0) ) \ { \ { \ action; \ } \ goto exceptionLabel; \ } \ } while ( 0 )