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 ClassesModifier and TypeInterfaceDescriptionstatic classA structure to represent a semaphore operation forsemop.Nested classes/interfaces inherited from interface com.sun.jna.Library
com.sun.jna.Library.Handler -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates that a request timed out.static final intIndicates a dead lock on a resource.static final intIndicates that a process does not exist.static final shortIndicates that one should not wait for the release of a semaphore if it is not currently available.static final intA null signal.static final shortIndicates 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 TypeMethodDescriptionintRuns thechmodcommand.intRuns thechowncommand.intRuns theftokcommand.intgetpid()Runs thegetpidcommand.intgetuid()Runs thegetuidcommand.intkill(int processId, int signal) Runs thekillcommand.intsemget(int key, int count, int flags) Runs thesemgetcommand.intsemop(int id, VirtualMachine.ForOpenJ9.Dispatcher.ForJnaPosixEnvironment.PosixLibrary.SemaphoreOperation operation, int flags) Runs thesemopcommand.
-
Field Details
-
NULL_SIGNAL
static final int NULL_SIGNALA null signal.- See Also:
-
ESRCH
static final int ESRCHIndicates that a process does not exist.- See Also:
-
EAGAIN
static final int EAGAINIndicates that a request timed out.- See Also:
-
EDEADLK
static final int EDEADLKIndicates a dead lock on a resource.- See Also:
-
SEM_UNDO
static final short SEM_UNDOIndicates that a semaphore's operations should be undone at process shutdown.- See Also:
-
IPC_NOWAIT
static final short IPC_NOWAITIndicates 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.LastErrorExceptionRuns thegetpidcommand.- Returns:
- The command's return value.
- Throws:
com.sun.jna.LastErrorException- If an error occurred.
-
getuid
int getuid() throws com.sun.jna.LastErrorExceptionRuns thegetuidcommand.- 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 thekillcommand.- 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
Runs thechmodcommand.- Parameters:
path- The file path.mode- The mode to set.- Returns:
- The return code.
- Throws:
com.sun.jna.LastErrorException- If an error occurred.
-
chown
Runs thechowncommand.- 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
Runs theftokcommand.- 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 thesemgetcommand.- 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 thesemopcommand.- 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.
-