Interface LinuxLibc

All Superinterfaces:
CLibrary, LibC, LibCAPI, Library, Reboot, Resource

public interface LinuxLibc extends 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.
  • Field Details

    • INSTANCE

      static final LinuxLibc INSTANCE
    • SYS_GETTID

      static final 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 Details

    • 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.LinuxUtmpx on 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

      NativeLong syscall(NativeLong number, Object... args)
      syscall() performs the system call whose assembly language interface has the specified number with the specified arguments.
      Parameters:
      number - sys call number
      args - 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.