mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-26 14:30:33 +02:00
* moved ugetrlimit to the implementation (as linux specific call it shouldn't be exported)
* syscall implementation for FreeBSD of get/setrlimit git-svn-id: trunk@13875 -
This commit is contained in:
parent
fff6e218af
commit
5121f470a2
@ -545,3 +545,13 @@ begin
|
|||||||
fpreadlink:=do_syscall(syscall_nr_readlink, TSysParam(name),TSysParam(linkname),maxlen);
|
fpreadlink:=do_syscall(syscall_nr_readlink, TSysParam(name),TSysParam(linkname),maxlen);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function FpGetRLimit(resource:cint;rlim:PRLimit):cint; [public, alias : 'FPC_SYSC_GETRLIMIT'];
|
||||||
|
begin
|
||||||
|
fpgetrlimit:=do_syscall(syscall_nr_getrlimit,TSysParam(Resource),TSysParam(rlim));
|
||||||
|
end;
|
||||||
|
|
||||||
|
function FpSetRLimit(Resource:cint;rlim:PRLimit):cint; [public, alias : 'FPC_SYSC_SETRLIMIT'];
|
||||||
|
begin
|
||||||
|
fpsetrlimit:=do_syscall(syscall_nr_getrlimit,TSysParam(Resource),TSysParam(rlim));
|
||||||
|
end;
|
||||||
|
|
||||||
|
@ -337,5 +337,7 @@ syscall_nr_getdirentries =196;
|
|||||||
syscall_nr_kse_thr_interrupt = 382;
|
syscall_nr_kse_thr_interrupt = 382;
|
||||||
syscall_nr_kse_release = 383;
|
syscall_nr_kse_release = 383;
|
||||||
syscall_nr_kse_switchin = 440;
|
syscall_nr_kse_switchin = 440;
|
||||||
|
syscall_nr_getrlimit = 194;
|
||||||
|
syscall_nr_setrlimit = 195;
|
||||||
|
|
||||||
|
|
||||||
|
@ -302,6 +302,13 @@ begin
|
|||||||
GetProcessID := SizeUInt (fpGetPID);
|
GetProcessID := SizeUInt (fpGetPID);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{$ifdef FPC_USE_LIBC}
|
||||||
|
{$ifdef HAS_UGETRLIMIT}
|
||||||
|
{ there is no ugetrlimit libc call, just map it to the getrlimit call in these cases }
|
||||||
|
function FpUGetRLimit(resource : cInt; rlim : PRLimit) : cInt; cdecl; external clib name 'getrlimit';
|
||||||
|
{$endif}
|
||||||
|
{$endif}
|
||||||
|
|
||||||
function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
|
function CheckInitialStkLen(stklen : SizeUInt) : SizeUInt;
|
||||||
var
|
var
|
||||||
limits : TRLimit;
|
limits : TRLimit;
|
||||||
|
@ -134,10 +134,6 @@ const
|
|||||||
// function fpsettimeofday(tp:ptimeval;tzp:ptimezone):cint;
|
// function fpsettimeofday(tp:ptimeval;tzp:ptimezone):cint;
|
||||||
{$endif}
|
{$endif}
|
||||||
function FpGetRLimit(resource : cInt; rlim : PRLimit) : cInt; cdecl; external clib name 'getrlimit';
|
function FpGetRLimit(resource : cInt; rlim : PRLimit) : cInt; cdecl; external clib name 'getrlimit';
|
||||||
{$ifdef HAS_UGETRLIMIT}
|
|
||||||
{ there is no ugetrlimit libc call, just map it to the getrlimit call in these cases }
|
|
||||||
function FpUGetRLimit(resource : cInt; rlim : PRLimit) : cInt; cdecl; external clib name 'getrlimit';
|
|
||||||
{$endif}
|
|
||||||
|
|
||||||
{$ifdef linux}
|
{$ifdef linux}
|
||||||
{$ifndef FPC_IS_SYSTEM}
|
{$ifndef FPC_IS_SYSTEM}
|
||||||
|
Loading…
Reference in New Issue
Block a user