Top Description Fields Methods
com.sun.jna.platform.linux

public Interface LibRT

extends Library
Imports
com.sun.jna.Library, .Native

POSIX.1b Realtime Extensions library (librt). Functions in this library provide most of the interfaces specified by the POSIX.1b Realtime Extension.

Field Summary

Modifier and TypeField and Description
public static final LibRT
Inherited from com.sun.jna.Library:
OPTION_ALLOW_OBJECTSOPTION_CALLING_CONVENTIONOPTION_CLASSLOADEROPTION_FUNCTION_MAPPEROPTION_INVOCATION_MAPPEROPTION_OPEN_FLAGSOPTION_STRING_ENCODINGOPTION_STRUCTURE_ALIGNMENTOPTION_SYMBOL_PROVIDEROPTION_TYPE_MAPPER

Method Summary

Modifier and TypeMethod and Description
public int

Returns:

On success, returns a file descriptor (a nonnegative integer). On failure, returns -1. On failure, errno is set to indicate the cause of the error.
shm_open
(String
The shared memory object to be created or opened. For portable use, a shared memory object should be identified by a name of the form /somename that is, a null-terminated string of up to NAME_MAX (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes.
name
,
int
A bit mask created by ORing together exactly one of O_RDONLY or O_RDWR and any of the other flags O_CREAT, O_EXCL, or O_TRUNC.
oflag
,
int
When oflag includes O_CREAT, the object's permission bits are set according to the low-order 9 bits of mode, except that those bits set in the process file mode creation mask (see umask(2)) are cleared for the new object.
mode
)

Creates and opens a new, or opens an existing, POSIX shared memory object.

Field Detail

INSTANCEback to summary
public static final LibRT INSTANCE

Method Detail

shm_openback to summary
public int shm_open(String name, int oflag, int mode)

Creates and opens a new, or opens an existing, POSIX shared memory object. A POSIX shared memory object is in effect a handle which can be used by unrelated processes to mmap() the same region of shared memory.

Parameters
name:String

The shared memory object to be created or opened. For portable use, a shared memory object should be identified by a name of the form /somename that is, a null-terminated string of up to NAME_MAX (i.e., 255) characters consisting of an initial slash, followed by one or more characters, none of which are slashes.

oflag:int

A bit mask created by ORing together exactly one of O_RDONLY or O_RDWR and any of the other flags O_CREAT, O_EXCL, or O_TRUNC.

mode:int

When oflag includes O_CREAT, the object's permission bits are set according to the low-order 9 bits of mode, except that those bits set in the process file mode creation mask (see umask(2)) are cleared for the new object.

Returns:int

On success, returns a file descriptor (a nonnegative integer). On failure, returns -1. On failure, errno is set to indicate the cause of the error.