1 #ifndef _ASM_I386_RELAY_H
2 #define _ASM_I386_RELAY_H
4 * linux/include/asm-i386/relay.h
6 * Copyright (C) 2002, 2003 - Tom Zanussi (zanussi@us.ibm.com), IBM Corp
7 * Copyright (C) 2002 - Karim Yaghmour (karim@opersys.com)
9 * i386 definitions for relayfs
12 #include <linux/relayfs_fs.h>
18 * get_time_delta - utility function for getting time delta
19 * @now: pointer to a timeval struct that may be given current time
22 * Returns either the TSC if TSCs are being used, or the time and the
23 * time difference between the current time and the buffer start time
24 * if TSCs are not being used.
27 get_time_delta(struct timeval *now, struct rchan *rchan)
31 if ((using_tsc(rchan) == 1) && cpu_has_tsc)
35 time_delta = calc_time_delta(now, &rchan->buf_start_time);
42 * get_timestamp - utility function for getting a time and TSC pair
44 * @tsc: the TSC associated with now
47 * Sets the value pointed to by now to the current time and the value
48 * pointed to by tsc to the tsc associated with that time, if the
49 * platform supports TSC.
52 get_timestamp(struct timeval *now,
58 if ((using_tsc(rchan) == 1) && cpu_has_tsc)
63 * get_time_or_tsc - utility function for getting a time or a TSC
68 * Sets the value pointed to by now to the current time or the value
69 * pointed to by tsc to the current tsc, depending on whether we're
73 get_time_or_tsc(struct timeval *now,
77 if ((using_tsc(rchan) == 1) && cpu_has_tsc)
84 * have_tsc - does this platform have a useable TSC?
86 * Returns 1 if this platform has a useable TSC counter for
87 * timestamping purposes, 0 otherwise.
98 #else /* No TSC support (#ifdef CONFIG_X86_TSC) */
99 #include <asm-generic/relay.h>
100 #endif /* #ifdef CONFIG_X86_TSC */