OpenCBM
|
Some utility helpers. More...
Go to the source code of this file.
Macros | |
#define | SECONDS(_x_) MILLISECONDS((_x_)*1000) |
#define | MILLISECONDS(_x_) MICROSECONDS((_x_)*1000) |
#define | MICROSECONDS(_x_) ((_x_) * 10) |
#define | LogErrorOnly(_Fdo_, _UniqueErrorValue_) LogError(_Fdo_, _UniqueErrorValue_, NULL, NULL) |
#define | LogErrorString(_Fdo_, _UniqueErrorValue_, _String1_, _String2_) LogError(_Fdo_, _UniqueErrorValue_, _String1_, _String2_) |
Functions | |
VOID | LogError (IN PDEVICE_OBJECT Fdo, IN NTSTATUS ErrorCode, const WCHAR *String1, const WCHAR *String2) |
Log an error entry in the system log. More... | |
#define LogErrorOnly | ( | _Fdo_, | |
_UniqueErrorValue_ | |||
) | LogError(_Fdo_, _UniqueErrorValue_, NULL, NULL) |
Log without giving any strings
Definition at line 35 of file util.h.
Referenced by AddDeviceCommonInit(), cbmiec_test_irq(), and ParPortAllocInterrupt().
#define LogErrorString | ( | _Fdo_, | |
_UniqueErrorValue_, | |||
_String1_, | |||
_String2_ | |||
) | LogError(_Fdo_, _UniqueErrorValue_, _String1_, _String2_) |
Log, giving up to 2 strings
Definition at line 39 of file util.h.
Referenced by AddDevice(), AddDeviceCommonInit(), cbm_start_thread(), and cbmiec_checkcable().
#define MILLISECONDS | ( | _x_ | ) | MICROSECONDS((_x_)*1000) |
#define SECONDS | ( | _x_ | ) | MILLISECONDS((_x_)*1000) |
VOID LogError | ( | IN PDEVICE_OBJECT | Fdo, |
IN NTSTATUS | ErrorCode, | ||
const WCHAR * | String1, | ||
const WCHAR * | String2 | ||
) |
Log an error entry in the system log.
Log an error entry in the system log.
Fdo | Pointer to a DEVICE_OBJECT structure. This is the device object for the target device, previously created by the driver's AddDevice routine. |
ErrorCode | The NTSTATUS code which should be reported on behalf of this error log entry |
String1 | Pointer to the 1st (WCHAR) string which has to be included into the error log entry. This can be NULL if no string is to be inserted. |
String2 | Pointer to the 2nd (WCHAR) string which has to be included into the error log entry. This can be NULL if no string is to be inserted. |
Definition at line 46 of file libcommon/util.c.
References DBG_ASSERT, FUNC_ENTER, and FUNC_LEAVE.