diff options
author | José Fonseca <[email protected]> | 2011-11-09 07:05:52 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2011-11-29 17:34:56 +0000 |
commit | 10b07665be5cff9fa9f03b0f7db459f3b380570d (patch) | |
tree | ebe9bcbf6586abbf27b9b4ae827fc459cedf05e0 /src/gallium/auxiliary/os/os_time.c | |
parent | 57f8e26ca87a2846f192682c84eccbf8b4500bfc (diff) |
Remove windows kernel support code.
Not actively used.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/os/os_time.c')
-rw-r--r-- | src/gallium/auxiliary/os/os_time.c | 50 |
1 files changed, 3 insertions, 47 deletions
diff --git a/src/gallium/auxiliary/os/os_time.c b/src/gallium/auxiliary/os/os_time.c index 73d86296d91..3e9d50a598a 100644 --- a/src/gallium/auxiliary/os/os_time.c +++ b/src/gallium/auxiliary/os/os_time.c @@ -37,13 +37,7 @@ #if defined(PIPE_OS_UNIX) # include <sys/time.h> /* timeval */ -#elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) -# include <windows.h> -# include <winddi.h> -#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT) -# include <windows.h> -extern VOID KeQuerySystemTime(PLARGE_INTEGER); -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) || defined(PIPE_SUBSYSTEM_WINDOWS_CE) +#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) # include <windows.h> #else # error Unsupported OS @@ -61,16 +55,7 @@ os_time_get(void) gettimeofday(&tv, NULL); return tv.tv_usec + tv.tv_sec*1000000LL; -#elif defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) - - static LONGLONG frequency; - LONGLONG counter; - if(!frequency) - EngQueryPerformanceFrequency(&frequency); - EngQueryPerformanceCounter(&counter); - return counter*INT64_C(1000000)/frequency; - -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) || defined(PIPE_SUBSYSTEM_WINDOWS_CE) +#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) static LARGE_INTEGER frequency; LARGE_INTEGER counter; @@ -79,40 +64,11 @@ os_time_get(void) QueryPerformanceCounter(&counter); return counter.QuadPart*INT64_C(1000000)/frequency.QuadPart; -#elif defined(PIPE_SUBSYSTEM_WINDOWS_MINIPORT) - - /* Updated every 10 miliseconds, measured in units of 100 nanoseconds. - * http://msdn.microsoft.com/en-us/library/ms801642.aspx */ - LARGE_INTEGER counter; - KeQuerySystemTime(&counter); - return counter.QuadPart/10; - #endif } -#if defined(PIPE_SUBSYSTEM_WINDOWS_DISPLAY) - -void -os_time_sleep(int64_t usecs) -{ - static LONGLONG frequency; - LONGLONG start, curr, end; - - EngQueryPerformanceCounter(&start); - - if(!frequency) - EngQueryPerformanceFrequency(&frequency); - - end = start + (usecs * frequency + 999999LL)/1000000LL; - - do { - EngQueryPerformanceCounter(&curr); - } while(start <= curr && curr < end || - end < start && (curr < end || start <= curr)); -} - -#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER) +#if defined(PIPE_SUBSYSTEM_WINDOWS_USER) void os_time_sleep(int64_t usecs) |