Implemented ExVerifySuite, ExInterlockedFlushSList, ExSystemExceptionFilter, ExRaiseException, ExGetCurrentProcessorCpuUsage, ExGetCurrentProcessorCounts

svn path=/trunk/; revision=11279
This commit is contained in:
Alex Ionescu 2004-10-12 00:56:46 +00:00
parent 9623e3cbe8
commit 973021673c
5 changed files with 71 additions and 46 deletions

View file

@ -254,15 +254,15 @@ ExfInterlockedCompareExchange64(
VOID
STDCALL
ExGetCurrentProcessorCounts (
PVOID IdleThreadTime,
PVOID SystemTime,
PVOID Number
PULONG ThreadKernelTime,
PULONG TotalCpuTime,
PULONG ProcessorNumber
);
VOID
STDCALL
ExGetCurrentProcessorCpuUsage (
PVOID RetVal
PULONG CpuUsage
);
ULONG

View file

@ -1,4 +1,4 @@
/* $Id: list.c,v 1.13 2004/08/15 16:39:01 chorns Exp $
/* $Id: list.c,v 1.14 2004/10/12 00:56:46 ion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -22,7 +22,7 @@ static KSPIN_LOCK ExpGlobalListLock = { 0, };
/* FUNCTIONS *************************************************************/
/*
* @unimplemented
* @implemented
*/
PSLIST_ENTRY
FASTCALL
@ -30,9 +30,11 @@ ExInterlockedFlushSList (
IN PSLIST_HEADER ListHead
)
{
PSLIST_ENTRY Old = NULL;
PSLIST_ENTRY Old;
Old = &ListHead->Next;
ListHead->Next.Next = 0;
UNIMPLEMENTED;
return Old;
}

View file

@ -1,4 +1,4 @@
/* $Id: sysinfo.c,v 1.50 2004/10/08 20:02:30 gvg Exp $
/* $Id: sysinfo.c,v 1.51 2004/10/12 00:56:46 ion Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -44,28 +44,50 @@ ExEnumHandleTable (
}
/*
* @unimplemented
*/
VOID
STDCALL
ExGetCurrentProcessorCounts (
PVOID IdleThreadTime,
PVOID SystemTime,
PVOID Number
)
{
UNIMPLEMENTED;
}
/*
* @unimplemented
* @implemented
*/
VOID
STDCALL
ExGetCurrentProcessorCpuUsage (
PVOID RetVal
PULONG CpuUsage
)
{
UNIMPLEMENTED;
PKPCR Pcr;
ULONG TotalTime;
ULONG PercentTime;
Pcr = KeGetCurrentKPCR();
TotalTime = Pcr->PrcbData.KernelTime + Pcr->PrcbData.UserTime;
PercentTime = 100 - (TotalTime / Pcr->PrcbData.CurrentThread->KernelTime * 100);
CpuUsage = &PercentTime;
}
/*
* @implemented
*/
VOID
STDCALL
ExGetCurrentProcessorCounts (
PULONG ThreadKernelTime,
PULONG TotalCpuTime,
PULONG ProcessorNumber
)
{
PKPCR Pcr;
ULONG TotalTime;
ULONG ThreadTime;
ULONG ProcNumber;
Pcr = KeGetCurrentKPCR();
TotalTime = Pcr->PrcbData.KernelTime + Pcr->PrcbData.UserTime;
ThreadTime = Pcr->PrcbData.CurrentThread->KernelTime;
ProcNumber = Pcr->ProcessorNumber;
ThreadKernelTime = &ThreadTime;
TotalCpuTime = &TotalTime;
ProcessorNumber = &ProcNumber;
}
NTSTATUS STDCALL

View file

@ -43,8 +43,9 @@ ExUuidCreate(
UNIMPLEMENTED;
return FALSE;
}
/*
* @unimplemented
* @implemented
*/
STDCALL
BOOLEAN
@ -52,7 +53,7 @@ ExVerifySuite(
SUITE_TYPE SuiteType
)
{
UNIMPLEMENTED;
if (SuiteType == Personal) return TRUE;
return FALSE;
}

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/* $Id: catch.c,v 1.48 2004/08/21 21:19:06 tamlin Exp $
/* $Id: catch.c,v 1.49 2004/10/12 00:56:46 ion Exp $
*
* PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/catch.c
@ -208,17 +208,29 @@ ExRaiseStatus (IN NTSTATUS Status)
}
/*
* @unimplemented
* @implemented
*/
VOID
STDCALL
ExRaiseException (
PEXCEPTION_RECORD pExcptRec
PEXCEPTION_RECORD ExceptionRecord
)
{
UNIMPLEMENTED;
RtlRaiseException(ExceptionRecord);
}
/*
* @implemented
*/
BOOLEAN
STDCALL
ExSystemExceptionFilter()
{
return KeGetPreviousMode() != KernelMode ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
}
/*
* @unimplemented
*/
@ -236,18 +248,6 @@ ExRaiseHardError (
UNIMPLEMENTED;
}
/*
* @unimplemented
*/
BOOLEAN
STDCALL
ExSystemExceptionFilter()
{
UNIMPLEMENTED;
return FALSE;
}
/*
* @unimplemented
*/