• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ***   To edit the content of this header, modify the corresponding
11  ***   source file (e.g. under external/kernel-headers/original/) then
12  ***   run bionic/libc/kernel/tools/update_all.py
13  ***
14  ***   Any manual change here will be lost the next time this script will
15  ***   be run. You've been warned!
16  ***
17  ****************************************************************************
18  ****************************************************************************/
19 #ifndef _ASM_GENERIC_CPUTIME_H
20 #define _ASM_GENERIC_CPUTIME_H
21 #include <linux/time.h>
22 #include <linux/jiffies.h>
23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
24 typedef unsigned long cputime_t;
25 #define cputime_zero (0UL)
26 #define cputime_max ((~0UL >> 1) - 1)
27 #define cputime_add(__a, __b) ((__a) + (__b))
28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
29 #define cputime_sub(__a, __b) ((__a) - (__b))
30 #define cputime_div(__a, __n) ((__a) / (__n))
31 #define cputime_halve(__a) ((__a) >> 1)
32 #define cputime_eq(__a, __b) ((__a) == (__b))
33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
34 #define cputime_gt(__a, __b) ((__a) > (__b))
35 #define cputime_ge(__a, __b) ((__a) >= (__b))
36 #define cputime_lt(__a, __b) ((__a) < (__b))
37 #define cputime_le(__a, __b) ((__a) <= (__b))
38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
39 #define cputime_to_jiffies(__ct) (__ct)
40 #define jiffies_to_cputime(__hz) (__hz)
41 typedef u64 cputime64_t;
42 #define cputime64_zero (0ULL)
43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
44 #define cputime64_add(__a, __b) ((__a) + (__b))
45 #define cputime64_sub(__a, __b) ((__a) - (__b))
46 #define cputime64_to_jiffies64(__ct) (__ct)
47 #define jiffies64_to_cputime64(__jif) (__jif)
48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
49 #define cputime_to_cputime64(__ct) ((u64) __ct)
50 #define cputime_to_msecs(__ct) jiffies_to_msecs(__ct)
51 #define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs)
52 #define cputime_to_secs(jif) ((jif) / HZ)
53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
54 #define secs_to_cputime(sec) ((sec) * HZ)
55 #define timespec_to_cputime(__val) timespec_to_jiffies(__val)
56 #define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val)
57 #define timeval_to_cputime(__val) timeval_to_jiffies(__val)
58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
59 #define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val)
60 #define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct)
61 #define clock_t_to_cputime(__x) clock_t_to_jiffies(__x)
62 #define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct)
63 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
64 #endif
65