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 VOID
STDCALL STDCALL
ExGetCurrentProcessorCounts ( ExGetCurrentProcessorCounts (
PVOID IdleThreadTime, PULONG ThreadKernelTime,
PVOID SystemTime, PULONG TotalCpuTime,
PVOID Number PULONG ProcessorNumber
); );
VOID VOID
STDCALL STDCALL
ExGetCurrentProcessorCpuUsage ( ExGetCurrentProcessorCpuUsage (
PVOID RetVal PULONG CpuUsage
); );
ULONG 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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -22,7 +22,7 @@ static KSPIN_LOCK ExpGlobalListLock = { 0, };
/* FUNCTIONS *************************************************************/ /* FUNCTIONS *************************************************************/
/* /*
* @unimplemented * @implemented
*/ */
PSLIST_ENTRY PSLIST_ENTRY
FASTCALL FASTCALL
@ -30,10 +30,12 @@ ExInterlockedFlushSList (
IN PSLIST_HEADER ListHead IN PSLIST_HEADER ListHead
) )
{ {
PSLIST_ENTRY Old = NULL; PSLIST_ENTRY Old;
UNIMPLEMENTED; Old = &ListHead->Next;
return Old; ListHead->Next.Next = 0;
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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -44,28 +44,50 @@ ExEnumHandleTable (
} }
/* /*
* @unimplemented * @implemented
*/
VOID
STDCALL
ExGetCurrentProcessorCounts (
PVOID IdleThreadTime,
PVOID SystemTime,
PVOID Number
)
{
UNIMPLEMENTED;
}
/*
* @unimplemented
*/ */
VOID VOID
STDCALL STDCALL
ExGetCurrentProcessorCpuUsage ( 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 NTSTATUS STDCALL

View file

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

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 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 * PROJECT: ReactOS kernel
* FILE: ntoskrnl/ke/catch.c * FILE: ntoskrnl/ke/catch.c
@ -208,17 +208,29 @@ ExRaiseStatus (IN NTSTATUS Status)
} }
/* /*
* @unimplemented * @implemented
*/ */
VOID VOID
STDCALL STDCALL
ExRaiseException ( ExRaiseException (
PEXCEPTION_RECORD pExcptRec PEXCEPTION_RECORD ExceptionRecord
) )
{ {
UNIMPLEMENTED; RtlRaiseException(ExceptionRecord);
} }
/*
* @implemented
*/
BOOLEAN
STDCALL
ExSystemExceptionFilter()
{
return KeGetPreviousMode() != KernelMode ? EXCEPTION_EXECUTE_HANDLER : EXCEPTION_CONTINUE_SEARCH;
}
/* /*
* @unimplemented * @unimplemented
*/ */
@ -236,18 +248,6 @@ ExRaiseHardError (
UNIMPLEMENTED; UNIMPLEMENTED;
} }
/*
* @unimplemented
*/
BOOLEAN
STDCALL
ExSystemExceptionFilter()
{
UNIMPLEMENTED;
return FALSE;
}
/* /*
* @unimplemented * @unimplemented
*/ */