mirror of
https://github.com/reactos/reactos.git
synced 2024-07-03 19:24:20 +00:00
- Implement IoFreeErrorLogEntry().
- Fix log size calculation in IopLogWorker(). svn path=/trunk/; revision=11104
This commit is contained in:
parent
f665fe8a22
commit
c0e4836b17
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: errlog.c,v 1.19 2004/08/21 20:51:26 tamlin Exp $
|
/* $Id: errlog.c,v 1.20 2004/09/28 12:51:14 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -118,11 +118,7 @@ IopRestartLogWorker (VOID)
|
||||||
KeInitializeTimer (&WorkerDpc->Timer);
|
KeInitializeTimer (&WorkerDpc->Timer);
|
||||||
|
|
||||||
/* Restart after 30 seconds */
|
/* Restart after 30 seconds */
|
||||||
#if defined(__GNUC__)
|
Timeout.QuadPart = (LONGLONG)-300000000;
|
||||||
Timeout.QuadPart = -300000000LL;
|
|
||||||
#else
|
|
||||||
Timeout.QuadPart = -300000000;
|
|
||||||
#endif
|
|
||||||
KeSetTimer (&WorkerDpc->Timer,
|
KeSetTimer (&WorkerDpc->Timer,
|
||||||
Timeout,
|
Timeout,
|
||||||
&WorkerDpc->Dpc);
|
&WorkerDpc->Dpc);
|
||||||
|
@ -181,7 +177,6 @@ IopLogWorker (PVOID Parameter)
|
||||||
/* Release the work item */
|
/* Release the work item */
|
||||||
ExFreePool (Parameter);
|
ExFreePool (Parameter);
|
||||||
|
|
||||||
|
|
||||||
/* Connect to the error log port */
|
/* Connect to the error log port */
|
||||||
if (IopLogPortConnected == FALSE)
|
if (IopLogPortConnected == FALSE)
|
||||||
{
|
{
|
||||||
|
@ -319,7 +314,7 @@ IopLogWorker (PVOID Parameter)
|
||||||
KeAcquireSpinLock (&IopAllocationLock,
|
KeAcquireSpinLock (&IopAllocationLock,
|
||||||
&Irql);
|
&Irql);
|
||||||
|
|
||||||
IopTotalLogSize -= LogEntry->PacketSize;
|
IopTotalLogSize -= (LogEntry->PacketSize - sizeof(ERROR_LOG_ENTRY));
|
||||||
ExFreePool (LogEntry);
|
ExFreePool (LogEntry);
|
||||||
|
|
||||||
KeReleaseSpinLock (&IopAllocationLock,
|
KeReleaseSpinLock (&IopAllocationLock,
|
||||||
|
@ -343,7 +338,7 @@ IoAllocateErrorLogEntry (IN PVOID IoObject,
|
||||||
ULONG LogEntrySize;
|
ULONG LogEntrySize;
|
||||||
KIRQL Irql;
|
KIRQL Irql;
|
||||||
|
|
||||||
DPRINT1 ("IoAllocateErrorLogEntry() called\n");
|
DPRINT("IoAllocateErrorLogEntry() called\n");
|
||||||
|
|
||||||
if (IoObject == NULL)
|
if (IoObject == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -379,18 +374,34 @@ IoAllocateErrorLogEntry (IN PVOID IoObject,
|
||||||
return (PVOID)((ULONG_PTR)LogEntry + sizeof(ERROR_LOG_ENTRY));
|
return (PVOID)((ULONG_PTR)LogEntry + sizeof(ERROR_LOG_ENTRY));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @unimplemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
VOID
|
VOID STDCALL
|
||||||
STDCALL
|
IoFreeErrorLogEntry(IN PVOID ElEntry)
|
||||||
IoFreeErrorLogEntry(
|
|
||||||
PVOID ElEntry
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
UNIMPLEMENTED;
|
PERROR_LOG_ENTRY LogEntry;
|
||||||
|
KIRQL Irql;
|
||||||
|
|
||||||
|
DPRINT("IoFreeErrorLogEntry() called\n");
|
||||||
|
|
||||||
|
if (ElEntry == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
LogEntry = (PERROR_LOG_ENTRY)((ULONG_PTR)ElEntry - sizeof(ERROR_LOG_ENTRY));
|
||||||
|
|
||||||
|
KeAcquireSpinLock(&IopAllocationLock,
|
||||||
|
&Irql);
|
||||||
|
|
||||||
|
IopTotalLogSize -= (LogEntry->PacketSize - sizeof(ERROR_LOG_ENTRY));
|
||||||
|
ExFreePool(LogEntry);
|
||||||
|
|
||||||
|
KeReleaseSpinLock(&IopAllocationLock,
|
||||||
|
Irql);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @implemented
|
* @implemented
|
||||||
*/
|
*/
|
||||||
|
@ -401,7 +412,7 @@ IoWriteErrorLogEntry (IN PVOID ElEntry)
|
||||||
PERROR_LOG_ENTRY LogEntry;
|
PERROR_LOG_ENTRY LogEntry;
|
||||||
KIRQL Irql;
|
KIRQL Irql;
|
||||||
|
|
||||||
DPRINT ("IoWriteErrorLogEntry() called\n");
|
DPRINT("IoWriteErrorLogEntry() called\n");
|
||||||
|
|
||||||
LogEntry = (PERROR_LOG_ENTRY)((ULONG_PTR)ElEntry - sizeof(ERROR_LOG_ENTRY));
|
LogEntry = (PERROR_LOG_ENTRY)((ULONG_PTR)ElEntry - sizeof(ERROR_LOG_ENTRY));
|
||||||
|
|
||||||
|
@ -434,7 +445,7 @@ IoWriteErrorLogEntry (IN PVOID ElEntry)
|
||||||
KeReleaseSpinLock (&IopLogListLock,
|
KeReleaseSpinLock (&IopLogListLock,
|
||||||
Irql);
|
Irql);
|
||||||
|
|
||||||
DPRINT ("IoWriteErrorLogEntry() done\n");
|
DPRINT("IoWriteErrorLogEntry() done\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* EOF */
|
/* EOF */
|
||||||
|
|
Loading…
Reference in a new issue