Interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int EAGAIN
      Indicates that a request timed out.
      static int EDEADLK
      Indicates a dead lock on a resource.
      static int ESRCH
      Indicates that a process does not exist.
      static short IPC_NOWAIT
      Indicates that one should not wait for the release of a semaphore if it is not currently available.
      static int NULL_SIGNAL
      A null signal.
      static short SEM_UNDO
      Indicates that a semaphore's operations should be undone at process shutdown.
      • 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_TYPE_MAPPER
    • Field Detail

      • SEM_UNDO

        static final short SEM_UNDO
        Indicates that a semaphore's operations should be undone at process shutdown.
        See Also:
        Constant Field Values
      • IPC_NOWAIT

        static final short IPC_NOWAIT
        Indicates that one should not wait for the release of a semaphore if it is not currently available.
        See Also:
        Constant Field Values
    • Method Detail

      • getpid

        int getpid()
            throws com.sun.jna.LastErrorException
        Runs the getpid command.
        Returns:
        The command's return value.
        Throws:
        com.sun.jna.LastErrorException - If an error occurred.
      • getuid

        int getuid()
            throws com.sun.jna.LastErrorException
        Runs the getuid command.
        Returns:
        The command's return value.
        Throws:
        com.sun.jna.LastErrorException - If an error occurred.
      • kill

        int kill​(int processId,
                 int signal)
          throws com.sun.jna.LastErrorException
        Runs the kill command.
        Parameters:
        processId - The target process id.
        signal - The signal to send.
        Returns:
        The command's return value.
        Throws:
        com.sun.jna.LastErrorException - If an error occurred.
      • chmod

        int chmod​(String path,
                  int mode)
           throws com.sun.jna.LastErrorException
        Runs the chmod command.
        Parameters:
        path - The file path.
        mode - The mode to set.
        Returns:
        The return code.
        Throws:
        com.sun.jna.LastErrorException - If an error occurred.
      • ftok

        int ftok​(String path,
                 int id)
          throws com.sun.jna.LastErrorException
        Runs the ftok command.
        Parameters:
        path - The file path.
        id - The id being used for creating the generated key.
        Returns:
        The generated key.
        Throws:
        com.sun.jna.LastErrorException - If an error occurred.
      • semget

        int semget​(int key,
                   int count,
                   int flags)
            throws com.sun.jna.LastErrorException
        Runs the semget command.
        Parameters:
        key - The key of the semaphore.
        count - The initial count of the semaphore.
        flags - The flags to set.
        Returns:
        The id of the semaphore.
        Throws:
        com.sun.jna.LastErrorException - If an error occurred.