Package oshi.jna.platform.linux
Interface LinuxLibc
-
- All Superinterfaces:
CLibrary,com.sun.jna.platform.linux.LibC,com.sun.jna.platform.unix.LibCAPI,com.sun.jna.Library,com.sun.jna.platform.unix.Reboot,com.sun.jna.platform.unix.Resource
public interface LinuxLibc extends com.sun.jna.platform.linux.LibC, CLibrary
Linux 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 Classes Modifier and Type Interface Description static classLinuxLibc.Exit_statusPart of utmpx structurestatic classLinuxLibc.LinuxUtmpxReturn type for getutxent()static classLinuxLibc.Ut_Tv32-bit timeval required for utmpx structure-
Nested classes/interfaces inherited from interface oshi.jna.platform.unix.CLibrary
CLibrary.Addrinfo, CLibrary.BsdIp6stat, CLibrary.BsdIpstat, CLibrary.BsdTcpstat, CLibrary.BsdUdpstat, CLibrary.Sockaddr
-
Nested classes/interfaces inherited from interface com.sun.jna.platform.linux.LibC
com.sun.jna.platform.linux.LibC.Statvfs, com.sun.jna.platform.linux.LibC.Sysinfo
-
-
Field Summary
Fields Modifier and Type Field Description static LinuxLibcINSTANCEstatic com.sun.jna.NativeLongSYS_GETTIDSYS_gettid Defined in one of: arch/arm64/include/asm/unistd32.h, 224 arch/x86/include/uapi/asm/unistd_32.h, 224 arch/x86/include/uapi/asm/unistd_64.h, 186 include/uapi/asm-generic/unistd.h, 178-
Fields inherited from interface oshi.jna.platform.unix.CLibrary
AI_CANONNAME, LOGIN_PROCESS, USER_PROCESS, UT_HOSTSIZE, UT_LINESIZE, UT_NAMESIZE
-
Fields inherited from interface com.sun.jna.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_MAPPER
-
Fields inherited from interface com.sun.jna.platform.unix.Reboot
RB_AUTOBOOT, RB_DISABLE_CAD, RB_ENABLE_CAD, RB_HALT_SYSTEM, RB_KEXEC, RB_POWER_OFF, RB_SW_SUSPEND
-
Fields inherited from interface com.sun.jna.platform.unix.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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intgettid()Returns the caller's thread ID (TID).LinuxLibc.LinuxUtmpxgetutxent()Reads a line from the current file position in the utmp file.com.sun.jna.NativeLongsyscall(com.sun.jna.NativeLong number, java.lang.Object... args)syscall() performs the system call whose assembly language interface has the specified number with the specified arguments.-
Methods inherited from interface oshi.jna.platform.unix.CLibrary
endutxent, freeaddrinfo, gai_strerror, getaddrinfo, getpid, open, pread, setutxent, sysctl, sysctlbyname, sysctlnametomib
-
-
-
-
Field Detail
-
INSTANCE
static final LinuxLibc INSTANCE
-
SYS_GETTID
static final com.sun.jna.NativeLong SYS_GETTID
SYS_gettid Defined in one of: arch/arm64/include/asm/unistd32.h, 224 arch/x86/include/uapi/asm/unistd_32.h, 224 arch/x86/include/uapi/asm/unistd_64.h, 186 include/uapi/asm-generic/unistd.h, 178
-
-
Method Detail
-
getutxent
LinuxLibc.LinuxUtmpx 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
LinuxLibc.LinuxUtmpxon success, and NULL on failure (which includes the "record not found" case)
-
gettid
int gettid()
Returns the caller's thread ID (TID). In a single-threaded process, the thread ID is equal to the process ID. In a multithreaded process, all threads have the same PID, but each one has a unique TID.- Returns:
- the thread ID of the calling thread.
-
syscall
com.sun.jna.NativeLong syscall(com.sun.jna.NativeLong number, java.lang.Object... args)syscall() performs the system call whose assembly language interface has the specified number with the specified arguments.- Parameters:
number- sys call numberargs- sys call arguments- Returns:
- The return value is defined by the system call being invoked. In general, a 0 return value indicates success. A -1 return value indicates an error, and an error code is stored in errno.
-
-