#ifndef IOKIT_IOLIB_H
#define IOKIT_IOLIB_H

#include <sys/cdefs.h>
#include <sys/appleapiopts.h>
#include <IOKit/system.h>
#include <IOKit/IOReturn.h>
#include <IOKit/IOTypes.h>
#include <IOKit/IOLocks.h>
#include <libkern/OSAtomic.h>
#include <kern/thread_call.h>
#include <kern/clock.h>

#include <IOKit/IOService.h>//hys

#define min(a,b) ((a) < (b) ? (a) : (b))
#define max(a,b) ((a) > (b) ? (a) : (b))

#define IOKIT_IOLIB_DEBUGGER
/*Debugger


Enter the kernel debugger. 
void Debugger(
    const char *reason);  
Parameters
reason
A C-string to describe why the debugger is being entered.
Discussion 

This function freezes the kernel and enters the builtin debugger. It may not be possible to exit the debugger without a second machine.*/
void Debugger(
    const char *reason);  

/*IOLog


Log a message to console in text mode, and /var/log/system.log. 
void IOLog(
    const char *format,
    ...) __attribute__(
    (
        format(
            printf,
            1,
            2)));  
Parameters
format
A printf() style format string (see printf() documentation).
other
arguments described by the format string.
Discussion 

This function allows a driver to log diagnostic information to the screen during verbose boots, and to a log file found at /var/log/system.log. IOLog should not be called from interrupt context.*/

void IOLog(const char *format, ...)
__attribute__((format(printf, 1, 2)));

#endif