Interface PosixCLibrary
- All Superinterfaces:
NativeLibrary
Provides access to methods in libc.so available on POSIX systems.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interface
corresponds to struct rlimit -
Method Summary
Modifier and TypeMethodDescriptionint
errno()
Return the error number from the last failed C library call.int
geteuid()
Gets the effective userid of the current process.int
getrlimit
(int resource, PosixCLibrary.RLimit rlimit) Retrieve the current rlimit values for the given resource.int
mlockall
(int flags) Lock all the current process's virtual address space into RAM.Create a new RLimit struct for use by getrlimit.strerror
(int errno) Return a string description for an error.
-
Method Details
-
geteuid
int geteuid()Gets the effective userid of the current process.- Returns:
- the effective user id
- See Also:
-
newRLimit
PosixCLibrary.RLimit newRLimit()Create a new RLimit struct for use by getrlimit. -
getrlimit
Retrieve the current rlimit values for the given resource.- Returns:
- 0 on success, -1 on failure with errno set
- See Also:
-
mlockall
int mlockall(int flags) Lock all the current process's virtual address space into RAM.- Parameters:
flags
- flags determining how memory will be locked- Returns:
- 0 on success, -1 on failure with errno set
- See Also:
-
strerror
Return a string description for an error.- Parameters:
errno
- The error number- Returns:
- a String description for the error
- See Also:
-
errno
int errno()Return the error number from the last failed C library call.- See Also:
-