blob: b3128ee855e627fe92dd2d2387051a475e9a813d [file] [log] [blame]
Christopher Ferris05d08e92016-02-04 13:16:38 -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 ***
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 Ferris525ce912017-07-26 13:12:53 -070021#include <linux/types.h>
Christopher Ferris8b7fdc92023-02-21 13:36:32 -080022enum pr_status {
23 PR_STS_SUCCESS = 0x0,
24 PR_STS_IOERR = 0x2,
25 PR_STS_RESERVATION_CONFLICT = 0x18,
26 PR_STS_RETRY_PATH_FAILURE = 0xe0000,
27 PR_STS_PATH_FAST_FAILED = 0xf0000,
28 PR_STS_PATH_FAILED = 0x10000,
29};
Christopher Ferris05d08e92016-02-04 13:16:38 -080030enum pr_type {
31 PR_WRITE_EXCLUSIVE = 1,
Christopher Ferris05d08e92016-02-04 13:16:38 -080032 PR_EXCLUSIVE_ACCESS = 2,
33 PR_WRITE_EXCLUSIVE_REG_ONLY = 3,
34 PR_EXCLUSIVE_ACCESS_REG_ONLY = 4,
35 PR_WRITE_EXCLUSIVE_ALL_REGS = 5,
Christopher Ferris05d08e92016-02-04 13:16:38 -080036 PR_EXCLUSIVE_ACCESS_ALL_REGS = 6,
37};
38struct pr_reservation {
39 __u64 key;
Christopher Ferris05d08e92016-02-04 13:16:38 -080040 __u32 type;
41 __u32 flags;
42};
43struct pr_registration {
Christopher Ferris05d08e92016-02-04 13:16:38 -080044 __u64 old_key;
45 __u64 new_key;
46 __u32 flags;
47 __u32 __pad;
Christopher Ferris05d08e92016-02-04 13:16:38 -080048};
49struct pr_preempt {
50 __u64 old_key;
51 __u64 new_key;
Christopher Ferris05d08e92016-02-04 13:16:38 -080052 __u32 type;
53 __u32 flags;
54};
55struct pr_clear {
Christopher Ferris05d08e92016-02-04 13:16:38 -080056 __u64 key;
57 __u32 flags;
58 __u32 __pad;
59};
Christopher Ferris05d08e92016-02-04 13:16:38 -080060#define PR_FL_IGNORE_KEY (1 << 0)
61#define IOC_PR_REGISTER _IOW('p', 200, struct pr_registration)
62#define IOC_PR_RESERVE _IOW('p', 201, struct pr_reservation)
63#define IOC_PR_RELEASE _IOW('p', 202, struct pr_reservation)
Christopher Ferris05d08e92016-02-04 13:16:38 -080064#define IOC_PR_PREEMPT _IOW('p', 203, struct pr_preempt)
65#define IOC_PR_PREEMPT_ABORT _IOW('p', 204, struct pr_preempt)
66#define IOC_PR_CLEAR _IOW('p', 205, struct pr_clear)
67#endif