OpenSS7
SS7 for the
Common Man
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.
Last modified: Mon, 28 Apr 2008 16:47:04 GMT
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of MI_RELEASE
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_RELEASE

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_RELEASE

Section: The OpenSS7 Project DDI/DKI (9)
Updated: Tue, 22 Aug 2017 20:37:09 GMT
Index Return to Main Contents

NAME

mi_release - unlock a queue private structure

SYNOPSIS

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

void mi_release(caddr_t ptr);

ARGUMENTS

ptr

a pointer to the locked queue private structure returned from a call to either mi_acquire(9) or mi_acquire_sleep(9).

INTERFACE

MPS®-specific DDI.

Linux Fast-STREAMS specific.

DESCRIPTION

mi_acquire(), mi_acquire_sleep(9), and mi_release(9) are a set of per queue pair Stream locking functions that can be used with the functions from the mi_open_comm(9) family.

mi_release() unlocks the specified locked private structure that was returned from a previous successful call to mi_acquire(9) or mi_acquire_sleep(9).

If another thread failed a call to mi_acquire(9) while the structure was locked, mi_release() will schedule the queue procedure, using qenable(9), of the queue whose pointer was passed to the failed mi_acquire(9) call.

If another thread failed a call to mi_acquire_sleep(9) while the structure was locked, mi_release() will wake the process that was put to sleep by mi_acquire_sleep(9).

USAGE

mi_acquire(9), mi_acquire_sleep(9) and mi_release() simplify the implementation of private structure locks for fully MP-SAFE STREAMS(9) modules and drivers. The function attempts to unlock the private structure associated with the pointer argument, ptr, locked by a previous call to mi_acquire(9) or mi_acquire_sleep(9).

mi_release() is called at the end of put or service procedure execution when the procedure wishes exclusive access to the private structure (perhaps to alter state variable) and acquires the lock at the beginning of the procedure.

mi_release() is always successful when passed valid arguments.

RETURN

mi_release() returns void.

ERRORS

mi_release() is always successful. If mi_release() is passed invalid or uninitialized arguments, or a ptr argument that has not been locked by the calling context, the result will be indeterminate.

CONTEXT

mi_release() can be called from any context, including user context, module procedures, callouts, callbacks, soft interrupts (tasklets and bottom halves), and interrupt service routines.

MP-STREAMS

mi_release() is MP-safe, however, the caller is responsible for ensuring the validity of the passed in pointer across the call.

NOTICES

mi_release() must only be called for a private structure that was allocated with mi_alloc(9) or mi_alloc_sleep(9) or one of the other private structure allocation functions from the mi_open_comm(9) family of functions.

Any queue that uses mi_release() should have a queue service procedure.

Each successful call to mi_acquire(9) or mi_acquire_sleep(9) must me matched with a corresponding call to mi_release() or processor or process deadlock may occur.

The lock acquired by mi_acquire(9) or mi_acquire_sleep(9) on the private structure associated with queue, q, is not a recursive lock. That is, if mi_acquire(9) or mi_acquire_sleep(9) are called successively for the same queue, q, and with no intervening call to mi_release(), the first call to mi_acquire(9) or mi_acquire_sleep(9) succeeds, and the second call to mi_acquire(9) fails and the second call to mi_acquire_sleep(9) sleeps indefinitely. The is adequate for both put, service and open, close routines which are seldomly reentrant.

IMPLEMENTATION

mi_release() is implemented using basic lock and syncrhonization variable functions. See UNLOCK(9) and SV_BROADCAST(9).

SEE ALSO

mi_acquire(9), mi_acquire_sleep(9), UNLOCK(9), SV_WAIT_SIG(9), mpscompat(9), aixcompat(9), maccompat(9), STREAMS(9).

BUGS

mi_release() has no known bugs.

COMPATIBILITY

mi_release() is compatible with MPS®, AIX®, MacOT®, and Solaris®, with the following portability considerations:

---
mi_release() is an OpenSS7 Project specific implementation of an MPS®-compatible function and should not be used by portable STREAMS drivers and modules.
---
mi_release() is provided for use with SS7 drivers and modules that need some automatic locking of queue pair private structure for speed and efficiency.
---
mi_release() does not exist in any other MPS® implementation other than Linux Fast-STREAMS.

See mpscompat(9), aixcompat(9), maccompat(9), suncompat(9), and STREAMS(9) for additional compatibility considerations.

CONFORMANCE

Conforms to OpenSS7 documentation.

HISTORY

mi_release() is new for The OpenSS7 Project. It is largely equivalent to the ss7_unlock(9) SS7 common function that appeared in early releases of the strss7 package and is also contained in The OpenSS7 Project.

IDENTIFICATION

The OpenSS7 Project: Package OpenSS7 version 0.9.2 released Tue, 22 Aug 2017 20:37:09 GMT.

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



Index

NAME
SYNOPSIS
ARGUMENTS
INTERFACE
DESCRIPTION
USAGE
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: 20:37:09 GMT, August 22, 2017
OpenSS7
SS7 for the
Common Man
Home TopIndex FirstPrev Next LastMore Download Info FAQ Mail  Home -> Documentation -> Man Pages -> Manpage of MI_RELEASE
Last modified: Mon, 28 Apr 2008 16:47:04 GMT
© Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved.