Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Enumerations | Functions
ioprio.h File Reference
#include <linux/sched.h>
#include <linux/iocontext.h>

Go to the source code of this file.

Macros

#define IOPRIO_BITS   (16)
 
#define IOPRIO_CLASS_SHIFT   (13)
 
#define IOPRIO_PRIO_MASK   ((1UL << IOPRIO_CLASS_SHIFT) - 1)
 
#define IOPRIO_PRIO_CLASS(mask)   ((mask) >> IOPRIO_CLASS_SHIFT)
 
#define IOPRIO_PRIO_DATA(mask)   ((mask) & IOPRIO_PRIO_MASK)
 
#define IOPRIO_PRIO_VALUE(class, data)   (((class) << IOPRIO_CLASS_SHIFT) | data)
 
#define ioprio_valid(mask)   (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)
 
#define IOPRIO_BE_NR   (8)
 
#define IOPRIO_NORM   (4)
 

Enumerations

enum  { IOPRIO_CLASS_NONE, IOPRIO_CLASS_RT, IOPRIO_CLASS_BE, IOPRIO_CLASS_IDLE }
 
enum  { IOPRIO_WHO_PROCESS = 1, IOPRIO_WHO_PGRP, IOPRIO_WHO_USER }
 

Functions

int ioprio_best (unsigned short aprio, unsigned short bprio)
 
int set_task_ioprio (struct task_struct *task, int ioprio)
 

Macro Definition Documentation

#define IOPRIO_BE_NR   (8)

Definition at line 36 of file ioprio.h.

#define IOPRIO_BITS   (16)

Definition at line 10 of file ioprio.h.

#define IOPRIO_CLASS_SHIFT   (13)

Definition at line 11 of file ioprio.h.

#define IOPRIO_NORM   (4)

Definition at line 47 of file ioprio.h.

#define IOPRIO_PRIO_CLASS (   mask)    ((mask) >> IOPRIO_CLASS_SHIFT)

Definition at line 14 of file ioprio.h.

#define IOPRIO_PRIO_DATA (   mask)    ((mask) & IOPRIO_PRIO_MASK)

Definition at line 15 of file ioprio.h.

#define IOPRIO_PRIO_MASK   ((1UL << IOPRIO_CLASS_SHIFT) - 1)

Definition at line 12 of file ioprio.h.

#define IOPRIO_PRIO_VALUE (   class,
  data 
)    (((class) << IOPRIO_CLASS_SHIFT) | data)

Definition at line 16 of file ioprio.h.

#define ioprio_valid (   mask)    (IOPRIO_PRIO_CLASS((mask)) != IOPRIO_CLASS_NONE)

Definition at line 18 of file ioprio.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
IOPRIO_CLASS_NONE 
IOPRIO_CLASS_RT 
IOPRIO_CLASS_BE 
IOPRIO_CLASS_IDLE 

Definition at line 26 of file ioprio.h.

anonymous enum
Enumerator:
IOPRIO_WHO_PROCESS 
IOPRIO_WHO_PGRP 
IOPRIO_WHO_USER 

Definition at line 38 of file ioprio.h.

Function Documentation

int ioprio_best ( unsigned short  aprio,
unsigned short  bprio 
)

Definition at line 158 of file ioprio.c.

int set_task_ioprio ( struct task_struct task,
int  ioprio 
)

Definition at line 32 of file ioprio.c.