blob: dbc7859f48834392278a15e3f7c50b4e1066f371 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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 ***
Ben Cheng94a85f62012-03-06 15:45:52 -080010 *** 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 ***
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080017 ****************************************************************************
18 ****************************************************************************/
19#ifndef _ASM_GENERIC_CPUTIME_H
20#define _ASM_GENERIC_CPUTIME_H
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080021#include <linux/time.h>
22#include <linux/jiffies.h>
Ben Cheng94a85f62012-03-06 15:45:52 -080023/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080024typedef unsigned long cputime_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080025#define cputime_zero (0UL)
26#define cputime_max ((~0UL >> 1) - 1)
27#define cputime_add(__a, __b) ((__a) + (__b))
Ben Cheng94a85f62012-03-06 15:45:52 -080028/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080029#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))
Ben Cheng94a85f62012-03-06 15:45:52 -080033/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080034#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))
Ben Cheng94a85f62012-03-06 15:45:52 -080038/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080039#define cputime_to_jiffies(__ct) (__ct)
40#define jiffies_to_cputime(__hz) (__hz)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080041typedef u64 cputime64_t;
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080042#define cputime64_zero (0ULL)
Ben Cheng94a85f62012-03-06 15:45:52 -080043/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080044#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)
Ben Cheng94a85f62012-03-06 15:45:52 -080048/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080049#define cputime_to_cputime64(__ct) ((u64) __ct)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080050#define cputime_to_msecs(__ct) jiffies_to_msecs(__ct)
51#define msecs_to_cputime(__msecs) msecs_to_jiffies(__msecs)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080052#define cputime_to_secs(jif) ((jif) / HZ)
Ben Cheng94a85f62012-03-06 15:45:52 -080053/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080054#define secs_to_cputime(sec) ((sec) * HZ)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080055#define timespec_to_cputime(__val) timespec_to_jiffies(__val)
56#define cputime_to_timespec(__ct,__val) jiffies_to_timespec(__ct,__val)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080057#define timeval_to_cputime(__val) timeval_to_jiffies(__val)
Ben Cheng94a85f62012-03-06 15:45:52 -080058/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080059#define cputime_to_timeval(__ct,__val) jiffies_to_timeval(__ct,__val)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080060#define cputime_to_clock_t(__ct) jiffies_to_clock_t(__ct)
61#define clock_t_to_cputime(__x) clock_t_to_jiffies(__x)
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080062#define cputime64_to_clock_t(__ct) jiffies_64_to_clock_t(__ct)
Ben Cheng94a85f62012-03-06 15:45:52 -080063/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
The Android Open Source Project1dc9e472009-03-03 19:28:35 -080064#endif