OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Fri, 17 Oct 2008 10:34:39 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of MI_OPEN_GRAB
Quick Links

Download

SCTP

SIGTRAN

SS7

Hardware

STREAMS

Asterisk

Related

Package

Manual

FAQ

Man Pages

Applications

SS7 Stack

ISDN Stack

SIGTRAN Stack

VoIP Stack

MG Stack

SS7/ISDN Devices

IP Transport

Embedded Systems

OS

Documentation

FAQ

SIGTRAN

Design

Conformance

Performance

References

Man Pages

Manuals

Papers

Home

Overview

Status

Documentation

Resources

About

News

Manpage of MI_OPEN_GRAB

Description: Manual Page

Keywords: ss7 ss7/ip ss7 over ip ss7 mtp ss7 sccp ss7 tcap sigtran mtp sccp tcap openss7 acb56 linux telephony pstn linux telephony linux nebs linux compactpci


MI_OPEN_GRAB

Section: The OpenSS7 Project DDI/DKI (9)
Updated: Wed, 18 Oct 2017 09:17:39 GMT
Index Return to Main Contents

NAME

mi_open_grab, mi_close_put - mi_open structure reference counting helper functions

SYNOPSIS

#define _MPS_SOURCE
#include <sys/stream.h>
#include <sys/ddi.h>
#include <sys/mpsddi.h>

caddr_t mi_open_grab(caddr_t ptr);
caddr_t mi_close_put(caddr_t ptr);

ARGUMENTS

ptr
a pointer to the per-instance user data structure.

INTERFACE

MPS®-specific DDI.

DESCRIPTION

mi_open_grab() and mi_close_put() are housekeeping functions that can be used to hold or release an open structure returned by mi_open_alloc(9). mi_open_grab() increase the reference count on the open structure, whereas mi_close_put() decreases the reference count and deallocates the structure when the reference count falls to zero.

RETURN

mi_open_grab() returns a pointer to the per-instance user data portion normally returned by mi_open_alloc(9). mi_close_put() returns a pointer to the per-instance user data portion normally returned by mi_open_alloc(9), unless the structure has been freed, in which case it returns NULL.

ERRORS

When passed valid arguments, these functions always succeed. When pased a NULL pointer, mi_open_grab() and mi_close_put() will return a NULL pointer.

CONTEXT

mi_open_grab() and mi_close_free() can be called from any context. Nevertheless, the functions are intended to be called from within the STREAMS driver or module qi_qopen(9) routine.

MP-STREAMS

mi_open_grab() and mi_close_put() are MP-safe. The caller has exclusive access to the returned data structures.

NOTICES

mi_open_grab() and mi_close_put() are MPS®-specific ufnctions: _MPS_SOURCE, _AIX_SOURCE or _MAC_SOURCE must be defined before including DDI/DKI include files to expose these symbols. The OpenSS7 Project must also have been compiled with CONFIG_STREAMS_COMPAT_MPS, CONFIG_STREAMS_COMPAT_MPS_MODULE, CONFIG_STREAMS_COMPAT_AIX, CONFIG_STREAMS_COMPAT_AIX_MODULE, CONFIG_STREAMS_COMPAT_MAC or CONFIG_STREAMS_COMPAT_MAC_MODULE defined.

IMPLEMENTATION

mi_open_grab() simply increments an atomic counter in the hidden structure. mi_close_put() simply decrements the counter, and when when counter reaches zero, the structure is deallocated.

SEE ALSO

mi_open_alloc(9), mi_open_alloc_sleep(9), mi_close_free(9).

BUGS

mi_open_grab() and mi_close_put() have no known bugs.

COMPATIBILITY

mi_open_grab() and mi_close_put() are OpenSS7 Project specific implementations of mi_open_alloc(9) and mi_close_free(9) that are inherently non-portable. While it is fairly straightforward to implement these in any Mentat implementation present on modern day UNIX systems, it requires exposing internals to the MPS implementation that might not be desirable.

CONFORMANCE

The OpenSS7 Project.

HISTORY

mi_open_grab() and mi_close_put() are OpenSS7 Project functions based loosely on the mi_open_alloc(9) and mi_close_free(9) Mentat functions.

IDENTIFICATION

The OpenSS7 Project: Package OpenSS7 version 0.9.2 released Wed, 18 Oct 2017 09:17:39 GMT.

Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
(See roff source for permission notice.)



Index

NAME
SYNOPSIS
ARGUMENTS
INTERFACE
DESCRIPTION
RETURN
ERRORS
CONTEXT
MP-STREAMS
NOTICES
IMPLEMENTATION
SEE ALSO
BUGS
COMPATIBILITY
CONFORMANCE
HISTORY
IDENTIFICATION

This document was created by man2html, using the manual pages.
Time: 09:17:39 GMT, October 18, 2017
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of MI_OPEN_GRAB
Last modified: Fri, 17 Oct 2008 10:34:39 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.