+/*!
+ * @function os_log_driverKit
+ *
+ * @abstract
+ * Log a message using a specific type. This variant should be called only from dexts.
+ *
+ * @discussion
+ * Will log a message with the provided os_log_type_t.
+ *
+ * @param log
+ * Pass OS_LOG_DEFAULT or a log object previously created with os_log_create.
+ *
+ * @param type
+ * Pass a valid type from os_log_type_t.
+ *
+ * @param format
+ * A format string to generate a human-readable log message when the log
+ * line is decoded. This string must be a constant string, not dynamically
+ * generated. Supports all standard printf types and %@ (objects).
+ *
+ * @result
+ * Returns EPERM if the caller is not a driverKit process, 0 in case of success.
+ */
+#define os_log_driverKit(out, log, type, format, ...) __extension__({ \
+ _Static_assert(__builtin_constant_p(format), "format string must be constant"); \
+ __attribute__((section("__TEXT,__os_log"))) static const char _os_log_fmt[] = format; \
+ _os_log_verify_format_str(format, ##__VA_ARGS__); \
+ (*(out)) = _os_log_internal_driverKit(&__dso_handle, log, type, _os_log_fmt, ##__VA_ARGS__); \
+ __asm__(""); /* avoid tailcall */ \
+})
+
+