diff options
author | Eugene V. Lyubimkin <jackyf@debian.org> | 2012-12-01 11:55:43 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:32 +0200 |
commit | 204a191cc68fa15147b2dcfc2711665bd88f758e (patch) | |
tree | d7c63186e2aca725938bc4a308d58a5f8789df16 /IOPriority.h | |
parent | d8bd1d8d45f42b28bd4674a5e88d0aa349f887c3 (diff) | |
parent | 2004bbc3ef28ada3acca05f5d5fa9108121a6784 (diff) | |
download | debian_htop-204a191cc68fa15147b2dcfc2711665bd88f758e.tar.gz debian_htop-204a191cc68fa15147b2dcfc2711665bd88f758e.tar.bz2 debian_htop-204a191cc68fa15147b2dcfc2711665bd88f758e.zip |
Imported Debian patch 1.0.2-1debian/1.0.2-1
Diffstat (limited to 'IOPriority.h')
-rw-r--r-- | IOPriority.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/IOPriority.h b/IOPriority.h new file mode 100644 index 0000000..d69e30d --- /dev/null +++ b/IOPriority.h @@ -0,0 +1,43 @@ +/* Do not edit this file. It was automatically generated. */ + +#ifndef HEADER_IOPriority +#define HEADER_IOPriority +/* +htop - IOPriority.h +(C) 2004-2012 Hisham H. Muhammad +Released under the GNU GPL, see the COPYING file +in the source distribution for its full text. + +Based on ionice, +Copyright (C) 2005 Jens Axboe <jens@axboe.dk> +Released under the terms of the GNU General Public License version 2 +*/ + + +enum { + IOPRIO_CLASS_NONE, + IOPRIO_CLASS_RT, + IOPRIO_CLASS_BE, + IOPRIO_CLASS_IDLE, +}; + +#define IOPRIO_WHO_PROCESS 1 + +#define IOPRIO_CLASS_SHIFT (13) +#define IOPRIO_PRIO_MASK ((1UL << IOPRIO_CLASS_SHIFT) - 1) + +#define IOPriority_class(ioprio_) ((int) ((ioprio_) >> IOPRIO_CLASS_SHIFT) ) +#define IOPriority_data(ioprio_) ((int) ((ioprio_) & IOPRIO_PRIO_MASK) ) + +typedef int IOPriority; + +#define IOPriority_tuple(class_, data_) (((class_) << IOPRIO_CLASS_SHIFT) | data_) + +#define IOPriority_error 0xffffffff + +#define IOPriority_None IOPriority_tuple(IOPRIO_CLASS_NONE, 0) +#define IOPriority_Idle IOPriority_tuple(IOPRIO_CLASS_IDLE, 0) + + + +#endif |