diff options
author | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:32 +0200 |
---|---|---|
committer | Daniel Lange <DLange@git.local> | 2016-04-11 13:00:32 +0200 |
commit | 2004bbc3ef28ada3acca05f5d5fa9108121a6784 (patch) | |
tree | 4b032c0acba5f80caf8b2802aa175f472334a26c /IOPriority.c | |
parent | e2b58f0ab81b2aafeb8c29a69abad7829fa21ab3 (diff) | |
download | debian_htop-2004bbc3ef28ada3acca05f5d5fa9108121a6784.tar.gz debian_htop-2004bbc3ef28ada3acca05f5d5fa9108121a6784.tar.bz2 debian_htop-2004bbc3ef28ada3acca05f5d5fa9108121a6784.zip |
Imported Upstream version 1.0.2upstream/1.0.2
Diffstat (limited to 'IOPriority.c')
-rw-r--r-- | IOPriority.c | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/IOPriority.c b/IOPriority.c new file mode 100644 index 0000000..7b19743 --- /dev/null +++ b/IOPriority.c @@ -0,0 +1,41 @@ +/* +htop - IOPriority.c +(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 +*/ + +#include "IOPriority.h" + +/*{ + +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) + +}*/ + |