Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 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 _UAPI_PR_H |
| 20 | #define _UAPI_PR_H |
Christopher Ferris | 525ce91 | 2017-07-26 13:12:53 -0700 | [diff] [blame] | 21 | #include <linux/types.h> |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 22 | enum pr_type { |
| 23 | PR_WRITE_EXCLUSIVE = 1, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 24 | PR_EXCLUSIVE_ACCESS = 2, |
| 25 | PR_WRITE_EXCLUSIVE_REG_ONLY = 3, |
| 26 | PR_EXCLUSIVE_ACCESS_REG_ONLY = 4, |
| 27 | PR_WRITE_EXCLUSIVE_ALL_REGS = 5, |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 28 | PR_EXCLUSIVE_ACCESS_ALL_REGS = 6, |
| 29 | }; |
| 30 | struct pr_reservation { |
| 31 | __u64 key; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 32 | __u32 type; |
| 33 | __u32 flags; |
| 34 | }; |
| 35 | struct pr_registration { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 36 | __u64 old_key; |
| 37 | __u64 new_key; |
| 38 | __u32 flags; |
| 39 | __u32 __pad; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 40 | }; |
| 41 | struct pr_preempt { |
| 42 | __u64 old_key; |
| 43 | __u64 new_key; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 44 | __u32 type; |
| 45 | __u32 flags; |
| 46 | }; |
| 47 | struct pr_clear { |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 48 | __u64 key; |
| 49 | __u32 flags; |
| 50 | __u32 __pad; |
| 51 | }; |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 52 | #define PR_FL_IGNORE_KEY (1 << 0) |
| 53 | #define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration) |
| 54 | #define IOC_PR_RESERVE _IOW('p', 201, struct pr_reservation) |
| 55 | #define IOC_PR_RELEASE _IOW('p', 202, struct pr_reservation) |
Christopher Ferris | 05d08e9 | 2016-02-04 13:16:38 -0800 | [diff] [blame] | 56 | #define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt) |
| 57 | #define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt) |
| 58 | #define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear) |
| 59 | #endif |