aboutsummaryrefslogtreecommitdiffstats
path: root/xen-2.4.16/include/asm-i386/time.h
blob: 2f834908a73d6431923a5d44a04cbd857841dc10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* -*-  Mode:C; c-basic-offset:4; tab-width:4 -*-
 ****************************************************************************
 * (C) 2002 - Rolf Neugebauer - Intel Research Cambridge
 ****************************************************************************
 *
 *        File: time.h
 *      Author: Rolf Neugebauer (neugebar@dcs.gla.ac.uk)
 *     Changes: 
 *              
 *        Date: Nov 2002
 * 
 * Environment: Xen Hypervisor
 * Description: Architecture dependent definition of time variables
 *
 ****************************************************************************
 * $Id: h-insert.h,v 1.4 2002/11/08 16:03:55 rn Exp $
 ****************************************************************************
 */

#ifndef _ASM_TIME_H_
#define _ASM_TIME_H_

#include <asm/types.h>
#include <asm/msr.h>

/*
 * Cycle Counter Time
 */
typedef u64 cc_time_t;
static inline cc_time_t get_cc_time()
{
	u64 ret;
	rdtscll(ret);
	return ret;
}

/*
 * System Time
 */
typedef s64      s_time_t;	     /* System time */
extern  u32      stime_pcc;      /* cycle counter value at last timer irq */
extern  s_time_t stime_now;      /* time in ns at last timer IRQ */

/*
 * Domain Virtual Time
 */
typedef u64 dv_time_t;

#endif /* _ASM_TIME_H_ */