xref: /titanic_51/usr/src/man/man3rsm/rsm_intr_signal_post.3rsm (revision ead9bb4b1be81d7bbf8ed86ee41d6c1e58b069a3)
te
Copyright (c) 2002 by Sun Microsystems, Inc. All rights reserved.
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
rsm_intr_signal_post 3RSM "7 Nov 2002" "SunOS 5.11" "Remote Shared Memory Library Functions"
NAME
rsm_intr_signal_post, rsm_intr_signal_wait - signal or wait for an event
SYNOPSIS

cc [ flag... ] file... -lrsm [ library... ]
#include <rsmapi.h> 

int rsm_intr_signal_post(void *memseg, uint_t flags);

int rsm_intr_signal_wait(void *memseg, int timeout);
DESCRIPTION

The rsm_intr_signal_post() and rsm_intr_signal_wait() functions are event functions that allow synchronization between importer processes and exporter processes. A process may block to wait for an event occurance by calling rsm_intr_signal_wait(). A process can signal a waiting process when an event occurs by calling rsm_intr_signal_post().

The rsm_intr_signal_post() function signals an event occurance. Either an import segment handle (rsm_memseg_import_handle_t) or an export segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument. If memseg refers to an import handle, the exporting process is signalled. If memseg refers to an export handle, all importers of that segment are signalled. The flags argument may be set to RSM_SIGPOST_NO_ACCUMULATE; this will cause this event to be discarded if an event is already pending for the target segment.

The rsm_intr_signal_wait() function allows a process to block and wait for an event occurance. Either an import segment handle (rsm_memseg_import_handle_t) or an export segment handle (rsm_memseg_export_handle_t) may be type cast to a void pointer for the memseg argument. The process blocks for up to timeout milliseconds for an event to occur; if the timeout value is -1, the process blocks until an event occurs or until interrupted.

RETURN VALUES

Upon successful completion, these functions return 0. Otherwise, an error value is returned to indicate the error.

ERRORS

The rsm_intr_signal_post() and rsm_intr_signal_wait() functions can return the following error:

RSMERR_BAD_SEG_HNDL

Invalid segment handle.

The rsm_intr_signal_post() function can return the following error:

RSMERR_CONN_ABORTED

Connection aborted.

RSMERR_REMOTE_NODE_UNREACHABL

Remote node not reachable.

The rsm_intr_signal_wait() function can return the following errors:

RSMERR_INTERRUPTED

Wait interrupted.

RSMERR_TIMEOUT

Timer expired.

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPE ATTRIBUTE VALUE
Interface StabilityEvolving
MT-LevelMT-Safe
SEE ALSO

rsm_memseg_get_pollfd(3RSM), attributes(5)