| OpenSS7 SS7 for the Common Man | © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. Last modified: Sat, 01 Nov 2008 10:42:03 GMT | ||||||||||||||||
| |||||||||||||||||
| Manpage of MPS_BECOME_WRITERDescription: Manual PageKeywords: 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 compactpciMPS_BECOME_WRITERSection: OpenSS7 STREAMS Compatibility DDI/DKI (9)Updated: 2008-10-31 Index Return to Main Contents NAMEmps_become_writer - STREAMS mutex upgradeSYNOPSIS#define _MAC_SOURCE
ARGUMENTS
DESCRIPTIONmps_become_writer() schedules the call-out function, proc, to be executed with the specified queue pair, q, and the passed in message, mp, once the driver or module queue can be entered exclusively. If there is no synchronization in effect for the queue, q, then this function has the same effect as calling proc directly with q and mp as arguments. USAGEmps_become_writer() allows non-STREAMS software to safely call STREAMS utilities. Non-STREAMS code can call mps_become_writer(), passing it a function and a queue pointer, q. OpenSS7 STREAMS Compatibility runs the function as it it were the queue's qi_putp(9) procedure. The function can safely manipulate the queue and access the same data structure as the queue's qi_putp(9) procedure. mps_become_writer() passes q and mp to proc. The caller must pass a valid message block pointer, mp, because OpenSS7 STREAMS Compatibility uses fields in the message block not visible to the STREAMS programmer. RETURNWhen mps_become_writer() succeeds, it returns true (1); when it fails, it returns false (0). ERRORSmps_become_writer() fails when q or mp are invalid. CONTEXTmps_become_writer() can be called from any context. MP-STREAMSmsp_become_writer() is MP-safe and was intended to support MP-safe operation in the SMP environment. Considerations should be given when writing the call-out function that the function may execute in parallel with asynchronous entry points, callbacks, call-outs and interrupt service procedures. However, in OpenSS7 STREAMS Compatibility, the call-out function is scheduled on the same CPU and the CPU which called mps_become_writer(). This means that mps_become_writer() will return before the call-out function executes when called on the ICS. Also, when called on the ICS, the call-out function will not execute before the calling function returns or the next preemption point is encountered. When called from any other context, the call-out function will execute before the call returns. NOTICESmps_become_writer() is a MacOT®-specific function: _MAC_SOURCE must be defined before including DDI/DKI include files to expose this symbol. OpenSS7 STREAMS Compatibility must also have been compiled with CONFIG_STREAMS_COMPAT_MAC or CONFIG_STREAMS_COMPAT_MAC_MODULE defined. IMPLEMENTATIONOpenSS7 STREAMS Compatibility uses a single mechanism, __strwrit(), for supporting all queue writer functions such as qwriter(9) and mps_become_writer(), and a single mechanism, __strfunc(), for supporting all queue put function such as streams_put(9). When called on the ICS, execution of the call-out function is deferrred until the next run of the STREAMS scheduler, strqsched(9), and the function simply returns. When called from any other context, synchronization is performed and the call-out function is executed immediately thereafter and before returning. See mp-streams(9) for more information. SEE ALSOqwriter(9), streams_put(9), maccompat(9), STREAMS(9). BUGSmps_become_writer() has no known bugs. COMPATIBILITYmps_become_writer() is compatible with MacOT® with the following portability considerations:
See maccompat(9) and STREAMS(9) for additional compatibility considerations. CONFORMANCEMacOT® DDI documentation[2, 3]. HISTORYmps_become_writer() first appeared in MacOT®. mps_become_writer() is probably a Mentat, Inc. function that goes all the way back to the pre-OSF/1 Mentat implementations. REFERENCES
TRADEMARKS
Other trademarks are the property of their respective owners. IDENTIFICATION
Copyright©1997-2008OpenSS7 Corp.
All Rights Reserved.
Index
This document was created by man2html, using the manual pages. Time: 03:38:27 GMT, May 22, 2013 | ||||||||||||||||
| OpenSS7 SS7 for the Common Man |
| ||||||||||||||||
| Last modified: Sat, 01 Nov 2008 10:42:03 GMT © Copyright 1997-2007 OpenSS7 Corporation All Rights Reserved. |