mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-11 14:09:37 +01:00
* fpnice fixes
This commit is contained in:
parent
1f5ebd946f
commit
93d838bd4d
@ -21,8 +21,14 @@ function fpNice(N:cint):cint;
|
|||||||
Doesn't exist in BSD. Linux emu uses setpriority in a construct as below:
|
Doesn't exist in BSD. Linux emu uses setpriority in a construct as below:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var prio : cint;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
fpNice:=fpSetPriority(Prio_Process,0,N);
|
fpseterrno(0);
|
||||||
|
prio:=fpgetpriority(PRIO_PROCESS,0);
|
||||||
|
if (prio=-1) and (errno<>0) then
|
||||||
|
exit(-1);
|
||||||
|
fpNice:=fpSetPriority(Prio_Process,0,prio+N);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function fpGetPriority(Which,Who:cint):cint;
|
Function fpGetPriority(Which,Who:cint):cint;
|
||||||
@ -112,7 +118,10 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2004-01-01 17:07:21 marco
|
Revision 1.5 2004-04-22 16:22:10 marco
|
||||||
|
* fpnice fixes
|
||||||
|
|
||||||
|
Revision 1.4 2004/01/01 17:07:21 marco
|
||||||
* few small freebsd fixes backported from debugging linux
|
* few small freebsd fixes backported from debugging linux
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user