Interface FreeBsdLibc
C library. This class should be considered non-API as it may be removed if/when its code is incorporated into the JNA
project.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classCPU Ticksstatic classConnection infostatic classReturn type for BSD sysctl kern.boottimeNested classes/interfaces inherited from interface CLibrary
CLibrary.Addrinfo, CLibrary.BsdIp6stat, CLibrary.BsdIpstat, CLibrary.BsdTcpstat, CLibrary.BsdUdpstat, CLibrary.SockaddrNested classes/interfaces inherited from interface LibCAPI
LibCAPI.size_t, LibCAPI.ssize_tNested classes/interfaces inherited from interface Library
Library.HandlerNested classes/interfaces inherited from interface Resource
Resource.Rlimit -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intConstantCP_IDLE=4static final intConstantCP_INTR=3static final intConstantCP_NICE=1static final intConstantCP_SYS=2static final intConstantCP_USER=0static final intConstantCPUSTATES=5static final FreeBsdLibcstatic final intConstantINT_SIZE=Native.getNativeSize(int.class)static final intConstantUINT64_SIZE=Native.getNativeSize(long.class)static final intstatic final intstatic final intstatic final intFields inherited from interface CLibrary
AI_CANONNAME, LOGIN_PROCESS, USER_PROCESS, UT_HOSTSIZE, UT_LINESIZE, UT_NAMESIZEFields inherited from interface LibCAPI
HOST_NAME_MAXFields inherited from interface Library
OPTION_ALLOW_OBJECTS, OPTION_CALLING_CONVENTION, OPTION_CLASSLOADER, OPTION_FUNCTION_MAPPER, OPTION_INVOCATION_MAPPER, OPTION_OPEN_FLAGS, OPTION_STRING_ENCODING, OPTION_STRUCTURE_ALIGNMENT, OPTION_SYMBOL_PROVIDER, OPTION_TYPE_MAPPERFields inherited from interface Reboot
RB_AUTOBOOT, RB_DISABLE_CAD, RB_ENABLE_CAD, RB_HALT_SYSTEM, RB_KEXEC, RB_POWER_OFF, RB_SW_SUSPENDFields inherited from interface Resource
RLIMIT_AS, RLIMIT_CORE, RLIMIT_CPU, RLIMIT_DATA, RLIMIT_FSIZE, RLIMIT_LOCKS, RLIMIT_MEMLOCK, RLIMIT_MSGQUEUE, RLIMIT_NICE, RLIMIT_NLIMITS, RLIMIT_NOFILE, RLIMIT_NPROC, RLIMIT_RSS, RLIMIT_RTPRIO, RLIMIT_RTTIME, RLIMIT_SIGPENDING, RLIMIT_STACK -
Method Summary
Modifier and TypeMethodDescriptionReads a line from the current file position in the utmp file.intStores the system-wide thread identifier for the current kernel-scheduled thread in the variable pointed by the argument id.Methods inherited from interface CLibrary
endutxent, freeaddrinfo, gai_strerror, getaddrinfo, getpid, open, pread, setutxent, sysctl, sysctlbyname, sysctlnametomibMethods inherited from interface LibCAPI
close, getdomainname, getegid, getenv, geteuid, getgid, gethostname, getloadavg, getuid, msync, munmap, setdomainname, setegid, setenv, seteuid, setgid, sethostname, setuid, unsetenv
-
Field Details
-
INSTANCE
-
UTX_USERSIZE
static final int UTX_USERSIZE- See Also:
-
UTX_LINESIZE
static final int UTX_LINESIZE- See Also:
-
UTX_IDSIZE
static final int UTX_IDSIZE- See Also:
-
UTX_HOSTSIZE
static final int UTX_HOSTSIZE- See Also:
-
UINT64_SIZE
static final int UINT64_SIZEConstantUINT64_SIZE=Native.getNativeSize(long.class) -
INT_SIZE
static final int INT_SIZEConstantINT_SIZE=Native.getNativeSize(int.class) -
CPUSTATES
static final int CPUSTATESConstantCPUSTATES=5- See Also:
-
CP_USER
static final int CP_USERConstantCP_USER=0- See Also:
-
CP_NICE
static final int CP_NICEConstantCP_NICE=1- See Also:
-
CP_SYS
static final int CP_SYSConstantCP_SYS=2- See Also:
-
CP_INTR
static final int CP_INTRConstantCP_INTR=3- See Also:
-
CP_IDLE
static final int CP_IDLEConstantCP_IDLE=4- See Also:
-
-
Method Details
-
getutxent
FreeBsdLibc.FreeBsdUtmpx getutxent()Reads a line from the current file position in the utmp file. It returns a pointer to a structure containing the fields of the line.Not thread safe
- Returns:
- a
FreeBsdLibc.FreeBsdUtmpxon success, and NULL on failure (which includes the "record not found" case)
-
thr_self
Stores the system-wide thread identifier for the current kernel-scheduled thread in the variable pointed by the argument id.- Parameters:
id- The thread identifier is an integer in the range from PID_MAX + 2 (100001) to INT_MAX. The thread identifier is guaranteed to be unique at any given time, for each running thread in the system.- Returns:
- If successful, returns zero, otherwise -1 is returned, and errno is set to indicate the error.
-