Interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary

  • All Superinterfaces:
    com.sun.jna.AltCallingConvention, com.sun.jna.Library, com.sun.jna.win32.StdCall, com.sun.jna.win32.StdCallLibrary
    Enclosing class:
    VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment

    protected static interface VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary
    extends com.sun.jna.win32.StdCallLibrary
    A library for interacting with Windows.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int SEMAPHORE_ALL_ACCESS
      Indicates that a semaphore requires all access rights.
      • 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
      • Fields inherited from interface com.sun.jna.win32.StdCallLibrary

        FUNCTION_MAPPER, STDCALL_CONVENTION
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      com.sun.jna.platform.win32.WinNT.HANDLE CreateMutex​(VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary.SecurityAttributes attributes, boolean owner, java.lang.String name)
      Create or opens a mutex.
      com.sun.jna.platform.win32.WinNT.HANDLE CreateSemaphoreW​(com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES securityAttributes, long count, long maximumCount, java.lang.String name)
      Creates a new semaphore.
      com.sun.jna.platform.win32.WinNT.HANDLE OpenMutex​(int access, boolean inherit, java.lang.String name)
      Opens an existing object.
      com.sun.jna.platform.win32.WinNT.HANDLE OpenSemaphoreW​(int access, boolean inheritHandle, java.lang.String name)
      Opens an existing semaphore.
      boolean ReleaseMutex​(com.sun.jna.platform.win32.WinNT.HANDLE handle)
      Releases the supplied mutex.
      boolean ReleaseSemaphore​(com.sun.jna.platform.win32.WinNT.HANDLE handle, long count, java.lang.Long previousCount)
      Releases the semaphore.
    • Field Detail

      • SEMAPHORE_ALL_ACCESS

        static final int SEMAPHORE_ALL_ACCESS
        Indicates that a semaphore requires all access rights.
        See Also:
        Constant Field Values
    • Method Detail

      • OpenSemaphoreW

        com.sun.jna.platform.win32.WinNT.HANDLE OpenSemaphoreW​(int access,
                                                               boolean inheritHandle,
                                                               java.lang.String name)
        Opens an existing semaphore.
        Parameters:
        access - The access rights.
        inheritHandle - true if the handle is inherited.
        name - The semaphore's name.
        Returns:
        The handle or null if the handle could not be created.
      • CreateSemaphoreW

        com.sun.jna.platform.win32.WinNT.HANDLE CreateSemaphoreW​(com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES securityAttributes,
                                                                 long count,
                                                                 long maximumCount,
                                                                 java.lang.String name)
        Creates a new semaphore.
        Parameters:
        securityAttributes - The security attributes for the created semaphore.
        count - The initial count for the semaphore.
        maximumCount - The maximum count for the semaphore.
        name - The semaphore's name.
        Returns:
        The handle or null if the handle could not be created.
      • ReleaseSemaphore

        boolean ReleaseSemaphore​(com.sun.jna.platform.win32.WinNT.HANDLE handle,
                                 long count,
                                 java.lang.Long previousCount)
        Releases the semaphore.
        Parameters:
        handle - The semaphore's handle.
        count - The amount with which to increase the semaphore.
        previousCount - The previous count of the semaphore or null.
        Returns:
        true if the semaphore was successfully released.
      • OpenMutex

        com.sun.jna.platform.win32.WinNT.HANDLE OpenMutex​(int access,
                                                          boolean inherit,
                                                          java.lang.String name)
        Opens an existing object.
        Parameters:
        access - The required access privileges.
        inherit - true if the mutex should be inherited.
        name - The mutex's name.
        Returns:
        The handle or null if the mutex could not be opened.
      • ReleaseMutex

        boolean ReleaseMutex​(com.sun.jna.platform.win32.WinNT.HANDLE handle)
        Releases the supplied mutex.
        Parameters:
        handle - The handle to the mutex.
        Returns:
        true if the handle was successfully released.