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.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA structure representing a mutex's security attributes.Nested classes/interfaces inherited from interface com.sun.jna.Library
com.sun.jna.Library.HandlerNested classes/interfaces inherited from interface com.sun.jna.win32.StdCallLibrary
com.sun.jna.win32.StdCallLibrary.StdCallCallback -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates 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_SYMBOL_PROVIDER, OPTION_TYPE_MAPPERFields inherited from interface com.sun.jna.win32.StdCallLibrary
FUNCTION_MAPPER, STDCALL_CONVENTION -
Method Summary
Modifier and TypeMethodDescriptioncom.sun.jna.platform.win32.WinNT.HANDLECreateMutex(VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary.SecurityAttributes attributes, boolean owner, String name) Create or opens a mutex.com.sun.jna.platform.win32.WinNT.HANDLECreateSemaphoreW(com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES securityAttributes, long count, long maximumCount, String name) Creates a new semaphore.com.sun.jna.platform.win32.WinNT.HANDLEOpens an existing object.com.sun.jna.platform.win32.WinNT.HANDLEOpenSemaphoreW(int access, boolean inheritHandle, String name) Opens an existing semaphore.booleanReleaseMutex(com.sun.jna.platform.win32.WinNT.HANDLE handle) Releases the supplied mutex.booleanReleaseSemaphore(com.sun.jna.platform.win32.WinNT.HANDLE handle, long count, Long previousCount) Releases the semaphore.
-
Field Details
-
SEMAPHORE_ALL_ACCESS
static final int SEMAPHORE_ALL_ACCESSIndicates that a semaphore requires all access rights.- See Also:
-
-
Method Details
-
OpenSemaphoreW
@MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE OpenSemaphoreW(int access, boolean inheritHandle, String name) Opens an existing semaphore.- Parameters:
access- The access rights.inheritHandle-trueif the handle is inherited.name- The semaphore's name.- Returns:
- The handle or
nullif the handle could not be created.
-
CreateSemaphoreW
@MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE CreateSemaphoreW(@MaybeNull com.sun.jna.platform.win32.WinBase.SECURITY_ATTRIBUTES securityAttributes, long count, long maximumCount, 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
nullif the handle could not be created.
-
ReleaseSemaphore
boolean ReleaseSemaphore(com.sun.jna.platform.win32.WinNT.HANDLE handle, long count, @MaybeNull 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 ornull.- Returns:
trueif the semaphore was successfully released.
-
CreateMutex
@MaybeNull com.sun.jna.platform.win32.WinNT.HANDLE CreateMutex(VirtualMachine.ForOpenJ9.Dispatcher.ForJnaWindowsEnvironment.WindowsLibrary.SecurityAttributes attributes, boolean owner, String name) Create or opens a mutex.- Parameters:
attributes- The mutex's security attributes.owner-trueif the caller is supposed to be the initial owner.name- The mutex name.- Returns:
- The handle to the mutex or
nullif the mutex could not be created.
-
OpenMutex
Opens an existing object.- Parameters:
access- The required access privileges.inherit-trueif the mutex should be inherited.name- The mutex's name.- Returns:
- The handle or
nullif 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:
trueif the handle was successfully released.
-