Blame src/mpi/romio/mpl/include/mpl_timer_win86_cycle.h
|
Packit Service |
c5cf8c |
/* -*- Mode: C; c-basic-offset:4 ; -*- */
|
|
Packit Service |
c5cf8c |
/*
|
|
Packit Service |
c5cf8c |
* (C) 2001 by Argonne National Laboratory.
|
|
Packit Service |
c5cf8c |
* See COPYRIGHT in top-level directory.
|
|
Packit Service |
c5cf8c |
*/
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#ifndef MPL_TIMER_WIN86_CYCLE_H_INCLUDED
|
|
Packit Service |
c5cf8c |
#define MPL_TIMER_WIN86_CYCLE_H_INCLUDED
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#include <winsock2.h>
|
|
Packit Service |
c5cf8c |
#include <windows.h>
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
static inline void MPL_wtime(MPL_time_t * timeval)
|
|
Packit Service |
c5cf8c |
{
|
|
Packit Service |
c5cf8c |
register int *f1 = (int *) var_ptr;
|
|
Packit Service |
c5cf8c |
__asm cpuid;
|
|
Packit Service |
c5cf8c |
__asm rdtsc;
|
|
Packit Service |
c5cf8c |
__asm mov ecx, f1;
|
|
Packit Service |
c5cf8c |
__asm mov[ecx], eax;
|
|
Packit Service |
c5cf8c |
__asm mov[ecx + TYPE int], edx;
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
return MPL_TIMER_SUCCESS;
|
|
Packit Service |
c5cf8c |
}
|
|
Packit Service |
c5cf8c |
|
|
Packit Service |
c5cf8c |
#endif /* MPL_TIMER_WIN86_CYCLE_H_INCLUDED */
|