vsyscall.h 803 字节
Newer Older
H
H. Peter Anvin 已提交
1 2
#ifndef _ASM_X86_VSYSCALL_H
#define _ASM_X86_VSYSCALL_H
L
Linus Torvalds 已提交
3 4 5 6

enum vsyscall_num {
	__NR_vgettimeofday,
	__NR_vtime,
7
	__NR_vgetcpu,
L
Linus Torvalds 已提交
8 9 10 11 12
};

#define VSYSCALL_START (-10UL << 20)
#define VSYSCALL_SIZE 1024
#define VSYSCALL_END (-2UL << 20)
13
#define VSYSCALL_MAPPED_PAGES 1
L
Linus Torvalds 已提交
14 15 16
#define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr))

#ifdef __KERNEL__
17
#include <linux/seqlock.h>
L
Linus Torvalds 已提交
18

19 20 21
#define VGETCPU_RDTSCP	1
#define VGETCPU_LSL	2

L
Linus Torvalds 已提交
22
/* kernel space (writeable) */
23
extern int vgetcpu_mode;
L
Linus Torvalds 已提交
24 25
extern struct timezone sys_tz;

26 27
#include <asm/vvar.h>

I
Ingo Molnar 已提交
28 29
extern void map_vsyscall(void);

30 31 32 33 34 35
/*
 * Called on instruction fetch fault in vsyscall page.
 * Returns true if handled.
 */
extern bool emulate_vsyscall(struct pt_regs *regs, unsigned long address);

L
Linus Torvalds 已提交
36 37
#endif /* __KERNEL__ */

H
H. Peter Anvin 已提交
38
#endif /* _ASM_X86_VSYSCALL_H */