summaryrefslogblamecommitdiff
path: root/src/unistd/nice.c
blob: 34f7c7f9c8f3e5af47f5281aa2a088efd2d6394f (plain) (tree)
1
2
3
4
5
6
7
8
                   
                         



                    
                
                                      


                                                                              
 
#include <unistd.h>
#include <sys/resource.h>
#include "syscall.h"

int nice(int inc)
{
#ifdef __NR_nice
	return syscall(SYS_nice, inc);
#else
	return setpriority(PRIO_PROCESS, 0, getpriority(PRIO_PROCESS, 0)+inc);
#endif
}