git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use defines in sys_getpriority/sys_setpriority
[pandora-kernel.git]
/
kernel
/
sys.c
diff --git
a/kernel/sys.c
b/kernel/sys.c
index
ec319bb
..
df4c3a8
100644
(file)
--- a/
kernel/sys.c
+++ b/
kernel/sys.c
@@
-14,6
+14,7
@@
#include <linux/prctl.h>
#include <linux/highuid.h>
#include <linux/fs.h>
#include <linux/prctl.h>
#include <linux/highuid.h>
#include <linux/fs.h>
+#include <linux/resource.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/workqueue.h>
#include <linux/kernel.h>
#include <linux/kexec.h>
#include <linux/workqueue.h>
@@
-659,7
+660,7
@@
asmlinkage long sys_setpriority(int which, int who, int niceval)
int error = -EINVAL;
struct pid *pgrp;
int error = -EINVAL;
struct pid *pgrp;
- if (which >
2 || which < 0
)
+ if (which >
PRIO_USER || which < PRIO_PROCESS
)
goto out;
/* normalize: avoid signed division (rounding problems) */
goto out;
/* normalize: avoid signed division (rounding problems) */
@@
-723,7
+724,7
@@
asmlinkage long sys_getpriority(int which, int who)
long niceval, retval = -ESRCH;
struct pid *pgrp;
long niceval, retval = -ESRCH;
struct pid *pgrp;
- if (which >
2 || which < 0
)
+ if (which >
PRIO_USER || which < PRIO_PROCESS
)
return -EINVAL;
read_lock(&tasklist_lock);
return -EINVAL;
read_lock(&tasklist_lock);