ReactOS  0.4.13-dev-259-g5ca9c9c
KeProcessor.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS kernel-mode tests
3  * LICENSE: LGPLv2+ - See COPYING.LIB in the top level directory
4  * PURPOSE: Kernel-Mode Test Suite Executive Regressions KM-Test
5  * PROGRAMMER: Aleksey Bragin <aleksey@reactos.org>
6  */
7 
8 /* TODO: this test doesn't process any test results; it also takes very long */
9 
10 #include <kmt_test.h>
11 
12 #define NDEBUG
13 #include <debug.h>
14 
16 {
17  ULONG i;
18  LARGE_INTEGER TimeStart, TimeFinish;
19 
20  DPRINT1("Waiting for 30 secs with 50us stalls...\n");
21  KeQuerySystemTime(&TimeStart);
22  for (i = 0; i < (30*1000*20); i++)
23  {
25  }
26  KeQuerySystemTime(&TimeFinish);
27  DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 30
28 
29  DPRINT1("Waiting for 30 secs with 1000us stalls...\n");
30  KeQuerySystemTime(&TimeStart);
31  for (i = 0; i < (30*1000); i++)
32  {
34  }
35  KeQuerySystemTime(&TimeFinish);
36  DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 30
37 
38  DPRINT1("Waiting for 30 secs with 1us stalls...\n");
39  KeQuerySystemTime(&TimeStart);
40  for (i = 0; i < (30*1000*1000); i++)
41  {
43  }
44  KeQuerySystemTime(&TimeFinish);
45  DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 43
46 
47  DPRINT1("Waiting for 30 secs with one huge stall...\n");
48  KeQuerySystemTime(&TimeStart);
49  KeStallExecutionProcessor(30*1000000);
50  KeQuerySystemTime(&TimeFinish);
51  DPRINT1("Time elapsed: %d secs\n", (TimeFinish.QuadPart - TimeStart.QuadPart) / 10000000); // 30
52 }
53 
54 START_TEST(KeProcessor)
55 {
57 }
#define KeQuerySystemTime(t)
Definition: env_spec_w32.h:570
static VOID KeStallExecutionProcessorTest(VOID)
Definition: KeProcessor.c:15
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
START_TEST(KeProcessor)
Definition: KeProcessor.c:54
#define DPRINT1
Definition: precomp.h:8
unsigned int ULONG
Definition: retypes.h:1
VOID NTAPI KeStallExecutionProcessor(IN ULONG MicroSeconds)
Definition: ntoskrnl.c:99
LONGLONG QuadPart
Definition: typedefs.h:112