📄 intarchlib.html
字号:
</blockquote><h4>NOTE ARM</h4><blockquote><p><p>ARM processors generally do not have on-chip interrupt controllers.Control of interrupts is a BSP-specific matter. This routine calls aBSP-specific routine to enable the interrupt. For each interruptlevel to be used, there must be a call to this routine before it willbe allowed to interrupt.<p></blockquote><h4>NOTE MIPS</h4><blockquote><p><p>For MIPS, it is strongly advised that the level be a combination of<b>SR_IBIT1</b> - <b>SR_IBIT8</b>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR. (MIPS: The previous contents of the status register).</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intDisable"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intDisable</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intDisable</i>( )</strong> - disable corresponding interrupt bits (MIPS, PowerPC, ARM)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int intDisable ( int level /* new interrupt bits (0x0 - 0xff00) */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>On MIPS and PowerPC architectures, this routine disables the correspondinginterrupt bits from the present status register. <p></blockquote><h4>NOTE ARM</h4><blockquote><p><p>ARM processors generally do not have on-chip interrupt controllers.Control of interrupts is a BSP-specific matter. This routine calls aBSP-specific routine to disable a particular interrupt level,regardless of the current interrupt mask level.<p></blockquote><h4>NOTE MIPS</h4><blockquote><p><p>For MIPS, the macros <b>SR_IBIT1</b> - <b>SR_IBIT8</b> define bits that may be set.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK or ERROR. (MIPS: The previous contents of the status register).</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intCRGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intCRGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intCRGet</i>( )</strong> - read the contents of the cause register (MIPS)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int intCRGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine reads and returns the contents of the MIPS causeregister.<p></blockquote><h4>RETURNS</h4><blockquote><p>The contents of the cause register.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intCRSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intCRSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intCRSet</i>( )</strong> - write the contents of the cause register (MIPS)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void intCRSet ( int value /* value to write to cause register */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine writes the contents of the MIPS cause register.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intSRGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intSRGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intSRGet</i>( )</strong> - read the contents of the status register (MIPS)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int intSRGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine reads and returns the contents of the MIPS statusregister.<p></blockquote><h4>RETURNS</h4><blockquote><p>The previous contents of the status register.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intSRSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intSRSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intSRSet</i>( )</strong> - update the contents of the status register (MIPS)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int intSRSet ( int value /* value to write to status register */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine updates and returns the previous contents of the MIPSstatus register.<p></blockquote><h4>RETURNS</h4><blockquote><p>The previous contents of the status register.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intConnect"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intConnect</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intConnect</i>( )</strong> - connect a C routine to a hardware interrupt</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS intConnect ( VOIDFUNCPTR * vector, /* interrupt vector to attach to */ VOIDFUNCPTR routine, /* routine to be called */ int parameter /* parameter to be passed to routine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine connects a specified C routine to a specified interruptvector. The address of <i>routine</i> is generally stored at <i>vector</i> sothat <i>routine</i> is called with <i>parameter</i> when the interrupt occurs.The routine is invoked in supervisor mode at interrupt level. A properC environment is established, the necessary registers saved, and thestack set up.<p>The routine can be any normal C code, except that it must not invokecertain operating system functions that may block or perform I/Ooperations.<p>This routine generally simply calls <b><i><a href="./intArchLib.html#intHandlerCreate">intHandlerCreate</a></i>( )</b> and<b><i><a href="./intArchLib.html#intVecSet">intVecSet</a></i>( )</b>. The address of the handler returned by <b><i><a href="./intArchLib.html#intHandlerCreate">intHandlerCreate</a></i>( )</b>is what actually goes in the interrupt vector.<p>This routine takes an interrupt vector as a parameter, which is the byteoffset into the vector table. Macros are provided to convert between interruptvectors and interrupt numbers, see <b><a href="./intArchLib.html#top">intArchLib</a></b>.<p></blockquote><h4>NOTE ARM</h4><blockquote><p><p>ARM processors generally do not have on-chip interrupt controllers.Control of interrupts is a BSP-specific matter. This routine calls aBSP-specific routine to install the handler such that, when theinterrupt occurs, <i>routine</i> is called with <i>parameter</i>.<p></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if the interrupt handler cannot be built.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b>, <b><i><a href="./intArchLib.html#intHandlerCreate">intHandlerCreate</a></i>( )</b>, <b><i><a href="./intArchLib.html#intVecSet">intVecSet</a></i>( )</b><hr><a name="intHandlerCreate"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intHandlerCreate</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intHandlerCreate</i>( )</strong> - construct an interrupt handler for a C routine (MC680x0, SPARC, i960, x86, MIPS)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>FUNCPTR intHandlerCreate ( FUNCPTR routine, /* routine to be called */ int parameter /* parameter to be passed to routine */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine builds an interrupt handler around the specified C routine.This interrupt handler is then suitable for connecting to a specificvector address with <b><i><a href="./intArchLib.html#intVecSet">intVecSet</a></i>( )</b>. The interrupt handler is invoked insupervisor mode at interrupt level. A proper C environment isestablished, the necessary registers saved, and the stack set up.<p>The routine can be any normal C code, except that it must not invokecertain operating system functions that may block or perform I/Ooperations.<p></blockquote><h4>RETURNS</h4><blockquote><p>A pointer to the new interrupt handler, or NULL if memory is insufficient.</blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b><hr><a name="intLockLevelSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intLockLevelSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intLockLevelSet</i>( )</strong> - set the current interrupt lock-out level (MC680x0, SPARC, i960, x86, ARM)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void intLockLevelSet ( int newLevel /* new interrupt level */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine sets the current interrupt lock-out level and stores itin the globally accessible variable <b>intLockMask</b>. The specifiedinterrupt level is masked when interrupts are locked by<b><i><a href="./intArchLib.html#intLock">intLock</a></i>( )</b>. The default lock-out level (MC680x0 = 7, SPARC = 15,i960 = 31, i386/i486 = 1) is initially set by <b><i><a href="./kernelLib.html#kernelInit">kernelInit</a></i>( )</b> whenVxWorks is initialized.<p></blockquote><h4>NOTE ARM</h4><blockquote><p><p>On the ARM, this call establishes the interrupt level to be set when<b><i><a href="./intArchLib.html#intLock">intLock</a></i>( )</b> is called.<p></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b>, <b><i><a href="./intArchLib.html#intLockLevelGet">intLockLevelGet</a></i>( )</b>, <b><i><a href="./intArchLib.html#intLock">intLock</a></i>( )</b>, <b><i><a href="./taskLib.html#taskLock">taskLock</a></i>( )</b><hr><a name="intLockLevelGet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intLockLevelGet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intLockLevelGet</i>( )</strong> - get the current interrupt lock-out level (MC680x0, SPARC, i960, x86, ARM)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>int intLockLevelGet (void)</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns the current interrupt lock-out level, which isset by <b><i><a href="./intArchLib.html#intLockLevelSet">intLockLevelSet</a></i>( )</b> and stored in the globally accessiblevariable <b>intLockMask</b>. This is the interrupt level currentlymasked when interrupts are locked out by <b><i><a href="./intArchLib.html#intLock">intLock</a></i>( )</b>. The defaultlock-out level (MC680x0 = 7, SPARC = 15, i960 = 31, i386/i486 = 1)is initially set by <b><i><a href="./kernelLib.html#kernelInit">kernelInit</a></i>( )</b> when VxWorks is initialized.<p></blockquote><h4>RETURNS</h4><blockquote><p>The interrupt level currently stored in the interruptlock-out mask. (ARM = ERROR always)<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./intArchLib.html#top">intArchLib</a></b>, <b><i><a href="./intArchLib.html#intLockLevelSet">intLockLevelSet</a></i>( )</b><hr><a name="intVecBaseSet"></a><p align=right><a href="rtnIndex.html"><i>Libraries : Routines</i></a></p></blockquote><h1><i>intVecBaseSet</i>( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong><i>intVecBaseSet</i>( )</strong> - set the vector (trap) base address (MC680x0, SPARC, i960, x86, MIPS, ARM)</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void intVecBaseSet (
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -