📄 rebootlib.html
字号:
<html><head><!-- /vobs/wpwr/docs/vxworks/ref/rebootLib.html - generated by refgen from rebootLib.c --> <title> rebootLib </title></head><body bgcolor="#FFFFFF"> <hr><a name="top"></a><p align=right><a href="libIndex.htm"><i>VxWorks API Reference : OS Libraries</i></a></p></blockquote><h1>rebootLib</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rebootLib</strong> - reboot support library </p></blockquote><h4>ROUTINES</h4><blockquote><p><p><b><a href="./rebootLib.html#reboot">reboot</a>( )</b> - reset network devices and transfer control to boot ROMs<br><b><a href="./rebootLib.html#rebootHookAdd">rebootHookAdd</a>( )</b> - add a routine to be called at reboot<br><p></blockquote><h4>DESCRIPTION</h4><blockquote><p>This library provides reboot support. To restart VxWorks, the routine<b><a href="./rebootLib.html#reboot">reboot</a>( )</b> can be called at any time by typing CTRL-X from the shell. Shutdownroutines can be added with <b><a href="./rebootLib.html#rebootHookAdd">rebootHookAdd</a>( )</b>. These are typically used toreset or synchronize hardware. For example, <b><a href="./netLib.html#top">netLib</a></b> adds a reboot hookto cause all network interfaces to be reset. Once the reboot hooks havebeen run, <b><a href="./sysLib.html#sysToMonitor">sysToMonitor</a>( )</b> is called to transfer control to the boot ROMs.For more information, see the manual entry for bootInit.<p></blockquote><h4>DEFICIENCIES</h4><blockquote><p>The order in which hooks are added is the order in which they are run.As a result, <b><a href="./netLib.html#top">netLib</a></b> will kill the network, and no user-added hook routineswill be able to use the network. There is no <b>rebootHookDelete( )</b> routine.<p></blockquote><h4>INCLUDE FILES</h4><blockquote><p><b>rebootLib.h</b><p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./sysLib.html#top">sysLib</a></b>, bootConfig, bootInit<hr><a name="reboot"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>reboot( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>reboot( )</strong> - reset network devices and transfer control to boot ROMs</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>void reboot ( int startType /* how the boot ROMS will reboot */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine returns control to the boot ROMs after calling a series ofpreliminary shutdown routines that have been added via<b><a href="./rebootLib.html#rebootHookAdd">rebootHookAdd</a>( )</b>, including routines to reset all network devices.After calling the shutdown routines, interrupts are locked, all cachesare cleared, and control is transferred to the boot ROMs.<p>The bit values for <i>startType</i> are defined in <b>sysLib.h</b>:<dl><dt><b>BOOT_NORMAL</b> (0x00)<dd>causes the system to go through the countdown sequence and try to rebootVxWorks automatically. Memory is not cleared.<dt><b>BOOT_NO_AUTOBOOT</b> (0x01)<dd>causes the system to display the VxWorks boot prompt and wait for userinput to the boot ROM monitor. Memory is not cleared.<dt><b>BOOT_CLEAR</b> (0x02)<dd>the same as <b>BOOT_NORMAL</b>, except that memory is cleared.<dt><b>BOOT_QUICK_AUTOBOOT</b> (0x04)<dd>the same as <b>BOOT_NORMAL</b>, except the countdown is shorter.</dl></blockquote><h4>RETURNS</h4><blockquote><p>N/A<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rebootLib.html#top">rebootLib</a></b>, <b><a href="./sysLib.html#sysToMonitor">sysToMonitor</a>( )</b>, <b><a href="./rebootLib.html#rebootHookAdd">rebootHookAdd</a>( )</b>, <i>VxWorks Programmer's Guide: Target Shell, </i><b><a href="../../tornado/tools/windsh.html#top" >windsh</a></b>, <i>Tornado User's Guide: Shell</i><hr><a name="rebootHookAdd"></a><p align=right><a href="rtnIndex.htm"><i>OS Libraries : Routines</i></a></p></blockquote><h1>rebootHookAdd( )</h1> <blockquote></a></blockquote><h4>NAME</h4><blockquote> <p><strong>rebootHookAdd( )</strong> - add a routine to be called at reboot</p></blockquote><h4>SYNOPSIS</h4><blockquote><p><pre>STATUS rebootHookAdd ( FUNCPTR rebootHook /* routine to be called at reboot */ )</pre></blockquote><h4>DESCRIPTION</h4><blockquote><p>This routine adds the specified routine to a list of routines to becalled when VxWorks is rebooted. The specified routine should bedeclared as follows:<pre> void rebootHook ( int startType /* startType is passed to all hooks */ )</pre></blockquote><h4>RETURNS</h4><blockquote><p>OK, or ERROR if memory is insufficient.<p></blockquote><h4>SEE ALSO</h4><blockquote><p><b><a href="./rebootLib.html#top">rebootLib</a></b>, <b><a href="./rebootLib.html#reboot">reboot</a>( )</b></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -