mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 10:59:18 +02:00
* added resource consts and types
git-svn-id: trunk@1749 -
This commit is contained in:
parent
2585309c04
commit
238510c59d
@ -247,6 +247,39 @@ Const
|
|||||||
S_IFWHT = 57344;
|
S_IFWHT = 57344;
|
||||||
S_ISVTX = 512;
|
S_ISVTX = 512;
|
||||||
|
|
||||||
|
{
|
||||||
|
* Resource limits from FreeBSD5. To be checked for the others.
|
||||||
|
}
|
||||||
|
RLIMIT_CPU = 0; { cpu time in milliseconds }
|
||||||
|
RLIMIT_FSIZE = 1; { maximum file size }
|
||||||
|
RLIMIT_DATA = 2; { data size }
|
||||||
|
RLIMIT_STACK = 3; { stack size }
|
||||||
|
RLIMIT_CORE = 4; { core file size }
|
||||||
|
RLIMIT_RSS = 5; { resident set size }
|
||||||
|
RLIMIT_MEMLOCK = 6; { locked-in-memory address space }
|
||||||
|
RLIMIT_NPROC = 7; { number of processes }
|
||||||
|
RLIMIT_NOFILE = 8; { number of open files }
|
||||||
|
{$IFDEF FreeBSD}
|
||||||
|
RLIMIT_SBSIZE = 9; { maximum size of all socket buffers }
|
||||||
|
RLIMIT_VMEM =10; { virtual process size (inclusive of mmap) }
|
||||||
|
{$ENDIF}
|
||||||
|
RLIMIT_AS = RLIMIT_VMEM; { standard name for RLIMIT_VMEM }
|
||||||
|
|
||||||
|
{$ifdef FreeBSD}
|
||||||
|
RLIM_NLIMITS =11; { number of resource limits }
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
{$ifdef Darwin} // OS X 10.3
|
||||||
|
RLIM_NLIMITS =9; { number of resource limits }
|
||||||
|
{$endif}
|
||||||
|
|
||||||
|
Type
|
||||||
|
TRLimit = record
|
||||||
|
rlim_cur, { current (soft) limit }
|
||||||
|
rlim_max : TRLim; { maximum value for rlim_cur }
|
||||||
|
end;
|
||||||
|
PRLimit = ^TRLimit;
|
||||||
|
|
||||||
CONST
|
CONST
|
||||||
{ Constansts for MMAP }
|
{ Constansts for MMAP }
|
||||||
MAP_PRIVATE =2;
|
MAP_PRIVATE =2;
|
||||||
|
@ -91,12 +91,15 @@ type
|
|||||||
ptimeval = ^timeval;
|
ptimeval = ^timeval;
|
||||||
TTimeVal = timeval;
|
TTimeVal = timeval;
|
||||||
|
|
||||||
timespec = packed record
|
timespec = packed record
|
||||||
tv_sec : time_t;
|
tv_sec : time_t;
|
||||||
tv_nsec : clong;
|
tv_nsec : clong;
|
||||||
end;
|
end;
|
||||||
ptimespec= ^timespec;
|
ptimespec= ^timespec;
|
||||||
Ttimespec= timespec;
|
Ttimespec= timespec;
|
||||||
|
|
||||||
|
rlim_t = int64;
|
||||||
|
TRlim = rlim_t;
|
||||||
|
|
||||||
CONST
|
CONST
|
||||||
{ System limits, POSIX value in parentheses, used for buffer and stack allocation }
|
{ System limits, POSIX value in parentheses, used for buffer and stack allocation }
|
||||||
|
@ -121,7 +121,8 @@ type
|
|||||||
pthread_rwlockattr_t = pointer;
|
pthread_rwlockattr_t = pointer;
|
||||||
|
|
||||||
sem_t = pointer;
|
sem_t = pointer;
|
||||||
|
rlim_t = int64;
|
||||||
|
TRlim = rlim_t;
|
||||||
{
|
{
|
||||||
Mutex types (Single UNIX Specification, Version 2, 1997).
|
Mutex types (Single UNIX Specification, Version 2, 1997).
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user