1 #ifndef _ASM_GENERIC_RELAY_H
2 #define _ASM_GENERIC_RELAY_H
4 * linux/include/asm-generic/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 * Architecture-independent definitions for relayfs
12 #include <linux/relayfs_fs.h>
15 * get_time_delta - utility function for getting time delta
16 * @now: pointer to a timeval struct that may be given current time
19 * Returns the time difference between the current time and the buffer
23 get_time_delta(struct timeval *now, struct rchan *rchan)
28 time_delta = calc_time_delta(now, &rchan->buf_start_time);
34 * get_timestamp - utility function for getting a time and TSC pair
36 * @tsc: the TSC associated with now
39 * Sets the value pointed to by now to the current time. Value pointed to
40 * by tsc is not set since there is no generic TSC support.
43 get_timestamp(struct timeval *now,
51 * get_time_or_tsc: - Utility function for getting a time or a TSC.
56 * Sets the value pointed to by now to the current time.
59 get_time_or_tsc(struct timeval *now,
67 * have_tsc - does this platform have a useable TSC?