📄 readme_recoverexcsigdemo.txt
字号:
FILE LIST - recoverExcSigDemo.c DESCRIPTION - tServer task executes functions at low priority (254). serverSend funtion is used to send a request to the tServer to execute a function at the tServer's priority. First tServer task executes the i() system call to print the summary of tShell task. Next an address exception is caused in tServer task by trying to execute a funtion at non-aligned word boundry. As a result SIGBUS signal is raised automatically. Signals (setjmp() and longjmp()) are used to allow the tServer task to recover gracefully from an address error exception. For more information about signals, please refer to sigLib manual pages. RUNNING DEMO - Add the file recoverExcDemo.c to a downloadable Tornado Project and build. Or place the recoverExcSigDemo.c file in your <Tornado> dir. Depending on the target you have, use the Make in the BSP dir. to compile. Include #define INCLUDE_SHELL in the config.h file To run this code invoke the function recoverExcDemo() after downloading to target CAVEAT - This code fails on a mv1604 board. TESTED ON - Host/Target : Solaris 2.5.1 / mv177 VxWorks : 5.3.1 - Host/Target : NT 4.0 / sbc8260 VxWorks : 5.5 EXAMPLE COMPILE LINE - make recoverExcSigDemo.o %make CPU=68k recoverExcSigDemo.o cc68k -B/petaluma1/mayur/tor101/host/sun4-solaris2/lib/gcc-lib/ -m68040 -ansi -nostdinc -O2 -fvolatile -fno-builtin -Wall -I/h -I. -I/petaluma1/mayur/tor101/target/config/all -I/petaluma1/mayur/tor101/target/h -I/petaluma1/mayur/tor101/target/src/config -I/petaluma1/mayur/tor101/target/src/drv -DCPU=MC68060 -c recoverExcSigDemo.c OUTPUTS/LOGFILE - On VxWorks target: ================== -> ld <recoverExcSigDemo.o value = 688064 = 0xa7fc0 -> sp (recoverExcDemo) task spawned: id = 1f90b3c, name = u0 value = 33098556 = 0x1f90b3c Exception number 3: Task: 0x1fff3d0 (tServer) Address Error Status Register : 0x27 2efe2 _vxTaskEntry +10 : _sigHandler (0, 0, 0, 0, 0, 0, 0, 0, 0, 0) 27a4c6 _sigHandler +208: _read (11, 1fff38c, 8) 1d450 _read +10 : _iosRead ([11, 1fff38c, 8, 1fff3a0, 27a4cc, 11]) 2460a _iosRead +72 : _pipeDevCreate ([1fffe98, 1fff38c, 8, 1fff370, 1d4 56, 11]) 2cd22 _pipeDevCreate +ee : _msgQReceive ([1fffea6, 1fff38c, 8, ffffffff, 0, & _taskIdSelf]) 78d2 _msgQReceive +b6 : _qJobGet ([1fffeaa, ffffffff, 0, 0, 0, 1fffe98]) The Output on Console: ====================== Starting the tServer task Running tServer task without causing an exception Task not found. Causing an address error exception in tServer task Signal SIGBUS (bus error) received from tServer task (0x1fff3d0)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -