Interface FreeBsdLibc

  • All Superinterfaces:
    CLibrary, com.sun.jna.platform.unix.LibCAPI, com.sun.jna.Library, com.sun.jna.platform.unix.Reboot, com.sun.jna.platform.unix.Resource

    public interface FreeBsdLibc
    extends CLibrary
    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 Summary

      Fields 
      Modifier and Type Field Description
      static int CP_IDLE
      Constant CP_IDLE=4
      static int CP_INTR
      Constant CP_INTR=3
      static int CP_NICE
      Constant CP_NICE=1
      static int CP_SYS
      Constant CP_SYS=2
      static int CP_USER
      Constant CP_USER=0
      static int CPUSTATES
      Constant CPUSTATES=5
      static FreeBsdLibc INSTANCE  
      static int INT_SIZE
      Constant INT_SIZE=Native.getNativeSize(int.class)
      static int UINT64_SIZE
      Constant UINT64_SIZE=Native.getNativeSize(long.class)
      static int UTX_HOSTSIZE  
      static int UTX_IDSIZE  
      static int UTX_LINESIZE  
      static int UTX_USERSIZE  
      • Fields inherited from interface com.sun.jna.platform.unix.LibCAPI

        HOST_NAME_MAX
      • 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
      FreeBsdLibc.FreeBsdUtmpx getutxent()
      Reads a line from the current file position in the utmp file.
      int thr_self​(com.sun.jna.ptr.NativeLongByReference id)
      Stores the system-wide thread identifier for the current kernel-scheduled thread in the variable pointed by the argument id.
      • Methods inherited from interface com.sun.jna.platform.unix.LibCAPI

        close, getdomainname, getegid, getenv, geteuid, getgid, gethostname, getloadavg, getuid, msync, munmap, setdomainname, setegid, setenv, seteuid, setgid, sethostname, setuid, unsetenv
      • Methods inherited from interface com.sun.jna.platform.unix.Reboot

        reboot
      • Methods inherited from interface com.sun.jna.platform.unix.Resource

        getrlimit, setrlimit
    • Method Detail

      • 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.FreeBsdUtmpx on success, and NULL on failure (which includes the "record not found" case)
      • thr_self

        int thr_self​(com.sun.jna.ptr.NativeLongByReference id)
        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.