]>
git.proxmox.com Git - wasi-libc.git/blob - libc-top-half/musl/src/unistd/nice.c
3 #include <sys/resource.h>
10 // Only query old priority if it can affect the result.
11 // This also avoids issues with integer overflow.
12 if (inc
> -2*NZERO
&& inc
< 2*NZERO
)
13 prio
+= getpriority(PRIO_PROCESS
, 0);
14 if (prio
> NZERO
-1) prio
= NZERO
-1;
15 if (prio
< -NZERO
) prio
= -NZERO
;
16 if (setpriority(PRIO_PROCESS
, 0, prio
)) {