Interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary

All Superinterfaces:
com.sun.jna.Library
Enclosing class:
VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment

protected static interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary extends com.sun.jna.Library
An API for interaction with POSIX systems.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A structure to represent a semaphore operation for semop.

    Nested classes/interfaces inherited from interface com.sun.jna.Library

    com.sun.jna.Library.Handler
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Indicates that a request timed out.
    static final int
    Indicates a dead lock on a resource.
    static final int
    Indicates that a process does not exist.
    static final short
    Indicates that one should not wait for the release of a semaphore if it is not currently available.
    static final int
    A null signal.
    static final short
    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_SYMBOL_PROVIDER, OPTION_TYPE_MAPPER
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    chmod(String path, int mode)
    Runs the chmod command.
    int
    chown(String path, long userId)
    Runs the chown command.
    int
    ftok(String path, int id)
    Runs the ftok command.
    int
    Runs the getpid command.
    int
    Runs the getuid command.
    int
    kill(int processId, int signal)
    Runs the kill command.
    int
    semget(int key, int count, int flags)
    Runs the semget command.
    int
    Runs the semop command.
  • Field Details

    • NULL_SIGNAL

      static final int NULL_SIGNAL
      A null signal.
      See Also:
    • ESRCH

      static final int ESRCH
      Indicates that a process does not exist.
      See Also:
    • EAGAIN

      static final int EAGAIN
      Indicates that a request timed out.
      See Also:
    • EDEADLK

      static final int EDEADLK
      Indicates a dead lock on a resource.
      See Also:
    • SEM_UNDO

      static final short SEM_UNDO
      Indicates that a semaphore's operations should be undone at process shutdown.
      See Also:
    • 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:
  • Method Details

    • 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.
    • chown

      int chown(String path, long userId) throws com.sun.jna.LastErrorException
      Runs the chown command.
      Parameters:
      path - The file path.
      userId - The user id 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.
    • semop

      int semop(int id, VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary.SemaphoreOperation operation, int flags) throws com.sun.jna.LastErrorException
      Runs the semop command.
      Parameters:
      id - The id of the semaphore.
      operation - The initial count of the semaphore.
      flags - The flags to set.
      Returns:
      The return code.
      Throws:
      com.sun.jna.LastErrorException - If the operation was not successful.