Christopher Ferris | 2abfa9e | 2021-11-01 16:26:06 -0700 | [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_LINUX_IOPRIO_H |
| 20 | #define _UAPI_LINUX_IOPRIO_H |
| 21 | #define IOPRIO_CLASS_SHIFT 13 |
| 22 | #define IOPRIO_CLASS_MASK 0x07 |
| 23 | #define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) |
| 24 | #define IOPRIO_PRIO_CLASS(ioprio) (((ioprio) >> IOPRIO_CLASS_SHIFT) & IOPRIO_CLASS_MASK) |
| 25 | #define IOPRIO_PRIO_DATA(ioprio) ((ioprio) & IOPRIO_PRIO_MASK) |
| 26 | #define IOPRIO_PRIO_VALUE(class,data) ((((class) & IOPRIO_CLASS_MASK) << IOPRIO_CLASS_SHIFT) | ((data) & IOPRIO_PRIO_MASK)) |
| 27 | enum { |
| 28 | IOPRIO_CLASS_NONE, |
| 29 | IOPRIO_CLASS_RT, |
| 30 | IOPRIO_CLASS_BE, |
| 31 | IOPRIO_CLASS_IDLE, |
| 32 | }; |
| 33 | #define IOPRIO_NR_LEVELS 8 |
| 34 | #define IOPRIO_BE_NR IOPRIO_NR_LEVELS |
| 35 | enum { |
| 36 | IOPRIO_WHO_PROCESS = 1, |
| 37 | IOPRIO_WHO_PGRP, |
| 38 | IOPRIO_WHO_USER, |
| 39 | }; |
| 40 | #define IOPRIO_NORM 4 |
| 41 | #define IOPRIO_BE_NORM IOPRIO_NORM |
| 42 | #endif |