📄 smobjlib.html
字号:
<a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smObjInit( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smObjInit( )</strong> - initialize a shared memory objects descriptor (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void smObjInit ( SM_OBJ_DESC * pSmObjDesc, /* ptr to shared memory descriptor */ SM_ANCHOR * anchorLocalAdrs, /* shared memory anchor local adrs */ int ticksPerBeat, /* cpu ticks per heartbeat */ int smObjMaxTries, /* max no. of tries to obtain spinLock */ int intType, /* interrupt method */ int intArg1, /* interrupt argument #1 */ int intArg2, /* interrupt argument #2 */ int intArg3 /* interrupt argument #3 */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine initializes a shared memory descriptor. The descriptor mustalready be allocated in the CPU's local memory. Once the descriptor hasbeen initialized by this routine, the CPU may attach itself to the shared memory area by calling <b><a href="./smObjLib.html#smObjAttach">smObjAttach</a>( )</b>.<p>This routine is called automatically when the component <b>INCLUDE_SM_OBJ</b> isincluded.<p>Only the shared memory descriptor itself is modified by this routine.No structures in shared memory are affected.<p>Parameters:<dl><dt><b><i>pSmObjDesc</i></b><dd>The address of the shared memory descriptor to be initialized; thisstructure must be allocated before <b><a href="./smObjLib.html#smObjInit">smObjInit</a>( )</b> is called.<dt><b><i>anchorLocalAdrs</i></b><dd>The memory address by which the local CPU may access the shared memoryanchor. This address may vary among CPUs in the system because of addressoffsets (particularly if the anchor is located in one CPU's dual-portedmemory).<dt><b><i>ticksPerBeat</i></b><dd>Specifies the frequency of the shared memory anchor's heartbeat. Thefrequency is expressed in terms of how many CPU ticks on the local CPUcorrespond to one heartbeat period.<dt><b><i>smObjMaxTries</i></b><dd>Specifies the maximum number of tries to obtain access to an internalmutually exclusive data structure.<dt><b><i>intType</i>, <i>intArg1</i>, <i>intArg2</i>, <i>intArg3</i></b><dd>Allow a CPU to announce the method by which it is to be notified of sharedmemory events. See the manual entry for <b><a href="./drv/if_sm.html#top" >if_sm</a></b> for a discussion aboutinterrupt types and their associated parameters.</dl></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smObjLib.html#top">smObjLib</a></b>, <b><a href="./smObjLib.html#smObjSetup">smObjSetup</a>( )</b>, <b><a href="./smObjLib.html#smObjAttach">smObjAttach</a>( )</b><hr><a name="smObjAttach"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smObjAttach( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smObjAttach( )</strong> - attach the calling CPU to the shared memory objects facility (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS smObjAttach ( SM_OBJ_DESC * pSmObjDesc /* pointer to shared memory descriptor */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine "attaches" the calling CPU to the shared memory objectsfacility. The shared memory area is identified by the shared memorydescriptor with an address specified by <i>pSmObjDesc</i>. The descriptor mustalready have been initialized by calling <b><a href="./smObjLib.html#smObjInit">smObjInit</a>( )</b>.<p>This routine is called automatically when the component <b>INCLUDE_SM_OBJ</b> isincluded.<p>This routine will complete the attach process only if and when the sharedmemory has been initialized by the master CPU. If the shared memory isnot recognized as active within the timeout period (10 minutes), thisroutine returns ERROR.<p>The <b><a href="./smObjLib.html#smObjAttach">smObjAttach</a>( )</b> routine connects the shared memory objects handler to theshared memory interrupt. Note that this interrupt may be shared betweenthe shared memory network driver and the shared memory objects facilitywhen both are used at the same time.<p></blockquote><h4>WARNING</h4><blockquote><p><p>Once a CPU has attached itself to the shared memory objects facility, it cannot be detached. Since the shared memory network driver and the shared memory objects facility use the same low-level attachingmechanism, a CPU cannot be detached from a shared memory network driverif the CPU also uses shared memory objects.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p><p>OK, or ERROR if the shared memory objects facility is not activeor the number of CPUs exceeds the maximum.<p></blockquote><h4>ERRNO</h4><blockquote><p><p> <b>S_smLib_INVALID_CPU_NUMBER</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smObjLib.html#top">smObjLib</a></b>, <b><a href="./smObjLib.html#smObjSetup">smObjSetup</a>( )</b>, <b><a href="./smObjLib.html#smObjInit">smObjInit</a>( )</b><hr><a name="smObjLocalToGlobal"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smObjLocalToGlobal( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smObjLocalToGlobal( )</strong> - convert a local address to a global address (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * smObjLocalToGlobal ( void * localAdrs /* local address to convert */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine converts a local shared memory address <i>localAdrs</i> to itscorresponding global value. This routine does not verify that<i>localAdrs</i> is really a valid local shared memory address.<p>All addresses stored in shared memory are global. Any access made to sharedmemory by the local CPU must be done using local addresses. This routineand <b><a href="./smObjLib.html#smObjGlobalToLocal">smObjGlobalToLocal</a>( )</b> are used to convert between these address types.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>The global shared memory address pointed to by <i>localAdrs</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smObjLib.html#top">smObjLib</a></b>, <b><a href="./smObjLib.html#smObjGlobalToLocal">smObjGlobalToLocal</a>( )</b><hr><a name="smObjGlobalToLocal"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smObjGlobalToLocal( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smObjGlobalToLocal( )</strong> - convert a global address to a local address (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void * smObjGlobalToLocal ( void * globalAdrs /* global address to convert */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine converts a global shared memory address <i>globalAdrs</i> to itscorresponding local value. This routine does not verify that <i>globalAdrs</i>is really a valid global shared memory address.<p>All addresses stored in shared memory are global. Any access made to sharedmemory by the local CPU must be done using local addresses. This routineand <b><a href="./smObjLib.html#smObjLocalToGlobal">smObjLocalToGlobal</a>( )</b> are used to convert between these address types.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>The local shared memory address pointed to by <i>globalAdrs</i>.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smObjLib.html#top">smObjLib</a></b>, <b><a href="./smObjLib.html#smObjLocalToGlobal">smObjLocalToGlobal</a>( )</b><hr><a name="smObjTimeoutLogEnable"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>smObjTimeoutLogEnable( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>smObjTimeoutLogEnable( )</strong> - control logging of failed attempts to take a spin-lock (VxMP Option)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void smObjTimeoutLogEnable ( BOOL timeoutLogEnable /* TRUE to enable, FALSE to disable */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine enables or disables the printing of a message whenan attempt to take a shared memory spin-lock fails.<p>By default, message logging is enabled.<p></blockquote><h4>AVAILABILITY</h4><blockquote><p>This routine is distributed as a component of the unbundled shared memoryobjects support option, VxMP.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./smObjLib.html#top">smObjLib</a></b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -