home *** CD-ROM | disk | FTP | other *** search
/ ftp.pasteur.org/FAQ/ / ftp-pasteur-org-FAQ.zip / FAQ / vxworks-faq / part1 < prev   
Text File  |  1995-06-03  |  85KB  |  2,253 lines

  1. Newsgroups: comp.os.vxworks,comp.answers,news.answers
  2. Path: bloom-beacon.mit.edu!hookup!swrinde!gatech!europa.eng.gtefsd.com!library.ucla.edu!csulb.edu!csus.edu!netcom.com!hjb
  3. From: hjb@netcom.com (squeedy)
  4. Subject: comp.os.vxworks Frequently Asked Questions (FAQ) [LONG]
  5. Message-ID: <hjbCpx5sp.Eyw@netcom.com>
  6. Followup-To: comp.os.vxworks
  7. Summary: This posting contains a list of Frequently Asked
  8.          Questions (and their answers) about VxWorks REALTIME
  9.      Operating System.  It should be read by anyone who wishes to
  10.      post to the comp.os.vxworks newsgroup.
  11. Keywords: vxworks,realtime,faq,kernel,tcp-ip,networking,vme,embedded
  12. Sender: hjb@netcom.com (squeedy)
  13. Reply-To: hjb@netcom.com
  14. Organization: PEACEFUL STAR, Oakland, CA
  15. Date: Mon, 16 May 1994 23:41:13 GMT
  16. Approved: news-answers-request@MIT.Edu
  17. Lines: 2233
  18. Xref: bloom-beacon.mit.edu comp.os.vxworks:2753 comp.answers:5390 news.answers:19606
  19.  
  20. Archive-name: vxworks-faq/part1
  21. Maintained-by: hjb@netcom.com
  22. Last-modified: May 16, 1994
  23. Version: 1.6
  24.  
  25. This is the list of frequently asked questions (and their answers) for
  26. the newsgroup comp.os.vxworks. 
  27.  
  28. Where possible, pointers to existing information are included here, rather
  29. than rehashing that information again.
  30.  
  31. If you haven't already done so, now is as good a time as any to read the
  32. guide to Net etiquette which is posted to news.annouce.newusers regularly.
  33. You should be familiar with acronyms like FAQ, FTP and IMHO, as well as know
  34. about smileys, followups and when to reply by email to postings.
  35.  
  36. The FAQ is currently posted to comp.os.vxworks, news.answers and
  37. comp.answers on the 15th of every month.  
  38.  
  39. This FAQ was compiled by hjb@netcom.com using comments by readers of
  40. comp.os.vxworks as well as his own limited knowledge of VxWorks.  Credits
  41. appear at the end.  Comments and indications of doubt are enclosed in []s in
  42. the text.  Each section begins with dashes ("-") on a line of their own,
  43. then the section number.  This should make searching for a specific section
  44. easy.
  45.  
  46. This FAQ is also available via anonymous ftp in:
  47.     rtfm.mit.edu:/pub/usenet/news.answers/vxworks-faq.Z
  48.     ftp.uu.net:/usenet/news.answers/vxworks-faq.Z 
  49.     cs.toronto.edu:/pub/usenet/comp.answers/vxworks-faq.Z
  50.     ftp.netcom.com:/pub/hjb/vxfaq.gz
  51.  
  52. -------------------------------------------------------------------------
  53.  
  54.         TABLE OF CONTENTS
  55.  
  56.     1. What is VxWorks? 
  57.     2. Brief History of VxWorks
  58.     3. What are some of the major features of VxWorks?
  59.     4. What are the Latest versions of VxWorks?
  60.     5. Where is the archive site for user-contributed code?
  61.     6. What application notes are available from Wind River?
  62.     7. How can I join the VxWorks user's group?
  63.     8. Is comp.os.vxworks also available via a mailing list?
  64.     9. Can I use gcc or g++ with VxWorks?
  65.     10. Other C/C++ Compiler tools for VxWorks?
  66.     11. Which cross-debuggers can I use with VxWorks?
  67.     12. What are differences between traditional UNIX and VxWorks?
  68.     13. What are the performance/benchmark numbers for WIND kernel?
  69.     14. What are the performance/benchmark numbers for VxWorks TCP/IP?
  70.     15. What is the VxSim VxWorks Simulator?
  71.     16. Can I use one boot EPROM for multiple boards on the same net?
  72.     17. What's the deal with 68881 FPU code in interrupt handlers?
  73.     18. Why does ls() not work on netDrv devices?
  74.     19. Why can't I do ".." at top level directories or NFS mount points?
  75.     20. Why do I have trouble using relative symbolic links with NFS?
  76.     21. X for VxWorks
  77.     22. IEEE-488 (GPIB) driver for VxWorks
  78.     23. How does one disable NFS client caching?
  79.     24. Why doing a lot of slipInit()/slipDelete() cause routing 
  80.         table corruption?
  81.     25. How does one get better network I/O performance?
  82.     26. How does one troubleshoot a backplane driver malfunction?
  83.     27. How do I add select support to my driver?
  84.     28. bind() gets EADDRINUSE, how do I fix it?
  85.     29. Common errors in interrupt handlers with floating point 
  86.         co-proc hardware
  87.     30. Finding entry point of a given module using its name
  88.     31. The problem with irint() in earlier (5.0.2 ?) releases
  89.     32. What are +T, +I thingies in the "i" output?
  90.     33. Gotchas w.r.t watchdogs
  91.     34. Is it possible to delete a memory partition in VxWorks?
  92.     35. rename() does not work in netDrv and nfsDrv filesystems, why?
  93.     36. Free NFS Server for VxWorks
  94.     37. Free SNMP for VxWorks
  95.     38. What third party products are available for VxWorks?
  96.     39. What kind of products have been developed using VxWorks?
  97.     40. A complete list of CPU hardware supported by VxWorks
  98.     41. A complete list of peripheral devices supported by VxWorks
  99.     42. What's with these unbundled "accessories"?
  100.     43. How come my 5.0.2 BSP isn't available in 5.1, damn it?
  101.     44. How much is VxWorks?
  102.     45. What is MicroWorks?
  103.     46. Other Unbundled Products for VxWorks?
  104.     47. How can I find out more about VxWorks?
  105.     48. What other net.resources are available on real-time systems?
  106.     49. How do i use FIONBIO in 5.0.2 when there is no fcntl()?  
  107.     50. Free lex and yacc for use with VxWorks
  108.     51. timer_gettime() bug
  109.     52. bogus INCLUDE_TCP_DEBUG
  110.     53. free ppp for VxWorks
  111.     54. how to disable cache on mc68040 or mc68030 using TT regs?
  112.     55. work-arounds for ms-dos filesystem bug when lseek() past eof
  113.     56. TCL for VxWorks
  114.     57. adding default route
  115.     58. adjusting network driver MTU size
  116.     59. tcpdump like utility for vxworks
  117.     60. VxWorks performance on i960 -- unofficial benchmark
  118.     61. VxWorks SCSI Performance -- unofficial benchmark
  119.     62. VME bus arbitration gotchas
  120.     63. 5.1.X new MMU supporting code gotchas, as explained in the Manual
  121.     64. "Cannot Boot. Error 0x1a9" while downloading/booting
  122.     65. problem with qsort in some versions of VxWorks
  123.     66. fmod fiasco
  124.     67. MVME167 copyback cache and various problems
  125.     68. unloading objects
  126. [new]    69. HDLC driver software 
  127. [new]    70. SO_KEEPALIVE
  128.     9999. Contributions to comp.os.vxworks FAQs.
  129.  
  130. -------------------------------------------------------------------------
  131.  
  132. 1. What is VxWorks?
  133.  
  134. VxWorks, from Wind River Systems, is a networked real-time operating
  135. system designed to be used in a distributed environment.  It runs on a
  136. wide variety of hardware, including MC680x0, MC683xx, Intel i960, Intel
  137. i386, R3000, SPARC, Fujitsu SPARClite, and TRON Gmicro, based systems. 
  138. It requires a host workstation for program development; supported host
  139. platforms include Sun3, Sun4, HP9000, IBM RS-6000, DEC, SGI, and MIPS. 
  140.  
  141. It does not run development systems software such as compiler, linker
  142. and editor on the target machine.  The development environment is based
  143. on cross-development or remote-development method.  You will need a
  144. UNIX machine of some sort (e.g. SUN's) to run the compilers and
  145. debuggers.  The compiled application code can be downloaded to the
  146. target and runs as part of the VxWorks image.  During the development
  147. phase or thereafter, individual object code (.o files) can be
  148. downloaded dynamically to running target system.  Finished applications
  149. can be ROM'ed or whatever.
  150.  
  151. ----------------------------
  152.  
  153. 2. Brief History of VxWorks
  154.  
  155. Based on what I have heard from David Wilner and others, WRS was
  156. started by Jerry Fiddler and David Wilner in Jerry's garage as a
  157. contract/consultant shop for realtime, embedded systems and other fun
  158. things.  Francis Coppola was one of the earlier customers.
  159.  
  160. They wrote a bunch of neat programs for their work and found that they
  161. liked them a great deal themselves, and added more excellent features
  162. to the system, eventually adding some things unheard of in
  163. embedded/realtime market in those days such TCP/IP networking. And
  164. continued to pioneer in this area by adding NFS, etc.
  165.  
  166. VxWorks was the name given the collection of software which ran on
  167. top of various realtime kernels including VRTX and pSOS as well an
  168. earlier slower version of WIND kernel.  [ editorial:
  169. VxWorks no longer runs on other kernels; it now runs exclusively on 
  170. its own WIND kernel since the 5.0 release, for which the WIND was 
  171. rewritten by John Fogelin. ]
  172.  
  173. They got more people interested in the system and became successful.
  174. And moved from a little building in Emeryville to a larger one. And
  175. eventually to the present site in Alameda.  And hired a  lot of people.
  176.  
  177. WRS sold many many more copies of this system and continues to grow
  178. like a real successful company.
  179.  
  180. -----------------------------
  181.  
  182. 3. What are some of the major features of VxWorks?
  183.  
  184. In Version 5.1:
  185.  
  186.  - wind kernel unlimited tasks
  187.  - 256 priorities
  188.  - binary, counting mutex semaphores
  189.  - message q's
  190.  - POSIX pipes
  191.  - sockets
  192.  - shared memory
  193.  - profiling utilities
  194.  - ethernet support (i596, LANCE, NIC, SONIC)
  195.  - SLIP (no PPP yet)
  196.  - backplane driver for network
  197.  - rlogin (server & client)
  198.  - telnet (server only)
  199.  - rpc (no rpcgen)
  200.  - nfs (client)
  201.  - ftp (server & client)
  202.  - tftp (client & server)
  203.  - rsh
  204.  - bootp
  205.  - proxyarp
  206.  - C-interpreter shell (incomplete but useful)
  207.  - symbolic debugging
  208.  - disassembly
  209.  - performmance monitoring tools
  210.  - exception handling
  211.  - signal handling (not quite UNIX compatible)
  212.  - dynamic object image loader
  213.  - system symbol table
  214.  - system info utilities
  215.  - libraries of 600+ utility routines
  216.  - remote source level debugger(VxGDB)
  217.  - SCSI support
  218.  - DOS & RT11 & Raw filesystems.
  219.  - "full ANSI"
  220.  - "POSIX I/O"
  221.  
  222. It is a good idea to get a copy of VxWorks manuals before purchasing
  223. the system.  WRS can provide you with such documentation.  As far as I
  224. know there is no "VxBook" in the bookstores.
  225.  
  226. ----------------------------
  227.  
  228. 4. What are the Latest versions of VxWorks?
  229.  
  230. As as of June 1993,
  231.  
  232.      5.0.3.: TRON will be discontinued.
  233.      5.0.3 : i386
  234.      5.0.5 : r3000
  235.      5.1   : 680x0, 683xx, i960, SPARC
  236.      i386 and r3000 will be upgraded to 5.1.
  237.  
  238. ------------------------------
  239.  
  240. 5. Where is the archive site for user-contributed code?
  241.  
  242. The VxWorks archive system is available for FTP as thor.atd.ucar.edu.
  243. It is also accessible via email server at vxworks_archive@ncar.ucar.edu.
  244. Questions should be directed to its maintainer, Richard Neitzel
  245. <thor@thor.ucar.edu>.
  246.  
  247. To get more detailed infomation send email to:
  248.  
  249. vxworks_archive@ncar.ucar.edu
  250.  
  251. The message body must read:
  252.  
  253. send index
  254. send index from vx
  255. send index from unix
  256.  
  257. A summary of the archives is periodically posted to comp.os.vxworks.
  258.  
  259. Some of the usual titles available:
  260.  
  261. ansi, ansilib, benchmarks, bitcnt, c++builtin, c++headers, camaclib, cbench
  262. cntsem_class, crc, deadman, dhrystones, dirlib, dt1451, fcompress
  263. flags_class, force, gcc+68040, getdate, hkv30extintutil, ivecalloc, joblib2
  264. lclflag, libX11, loadmeter, math, monitor, msgque_class, ntpvx, ping, pipe
  265. poolLib, ring, semCnt, ss1, stevie, string, syslog, task_class, taskmon, tod
  266. tp41, ty335, veclist, vtape, vwcurses, vx_cplusplus, vxrsh, wdog_class, shar
  267. vxtool, vxview, xc
  268.  
  269. ------------------------------
  270.  
  271. 6. What application notes are available from Wind River?
  272.  
  273.   List of Wind Technical Notes
  274.  
  275.  Motorola MV147 Slave Base Control       9-1
  276.  System hang during lkup( ) output       10-1
  277.  Reserving Memory                        11-1
  278.  Serial IO Vanishing                     13-1
  279.  NFS: problems with writing files        14-1
  280.  Which interrupts does VxWorks use?      15-1
  281.  Debugging ftp problems                  18-1
  282.  Interrupt handlers, floating point      19-1
  283.  Booting From a Memory Board             22-1
  284.  Changing Network Interfaces             23-1
  285.  Writing Non-buffered Sockets            24-1
  286.  RPC and VxWorks                         25-1
  287.  Using SCSI devices with VxWorks 5.x     26-1
  288.  The Select Facility in VxWorks          28-1
  289.         Using on-board Serial Ports       29-1
  290.         Problems with ls()            30-1
  291.  SCSI                      31-1
  292.  Trouble Shooting Booting Problems       32-1
  293.  
  294. -----------------------------
  295.  
  296. 7. How can I join the VxWorks user's group?
  297.  
  298. For User Group info contact WRS or Eric Rabinowitz of Panoramic Systems at:
  299.  
  300.  elr@netcom.com   or  ericr@wrs.com 
  301.  phone: 408-289-7757
  302.  
  303. ------------------------------
  304.  
  305. 8. Is comp.os.vxworks also available via a mailing list?
  306.  
  307. Lawrence Berkeley Labs maintains an automated mailing list which is
  308. bi-directionally gatewayed to comp.os.vxworks
  309.  
  310. It is called the 'VxWorks Exploder'.
  311.  
  312. Mail to vxwexplo@lbl.gov is automatically mailed to a number
  313. of sites, including Wind River.
  314.  
  315. Send subscription request to vxwexplo-request@lbl.gov.
  316.  
  317. ------------------------------
  318.  
  319. 9. Can I use gcc or g++ with VxWorks?
  320.  
  321. WRS's gcc GNU Toolkit distribution can be reshipped in its entirety. 
  322. WRS charges are for media and support, so obviously copies thereof
  323. don't matter to them.
  324.  
  325. Lots of customers use g++ as provided by the "net" --
  326. see the VxWorks Archive information below.
  327.  
  328. You can get a generic freely distributable GCC/G++ and compile your
  329. code for VxWorks.  Or you can just get a copy from someone who has a
  330. working GCC cross-development setup from WRS.
  331.  
  332. WRS worked with Cygnus to polish up their release of GCC but a generic
  333. GCC distribution works just fine as well.
  334.  
  335. For MC68K targets:
  336.  You can also use native SunOS 4.X cc running on Sun-3's.
  337.  You can also use various other free m68k C compilers
  338.  such as lcc, sozobon, etc. provided that you're willing
  339.  to hack on them.
  340.  
  341. Richard Neitzel (thor@thor.atd.ucar.edu) writes,
  342.  
  343. Thanks to some feedback I've corrected the archive instructions on how to
  344. build gcc, libgcc and libg++ for VxWorks. To make my life simpler the
  345. patches referenced are no longer included in the vx_cplusplus file. Instead
  346. there are now seperate patch files for the effected parts:
  347.  
  348. libg++-2.5-src.patch: Patches libg++/src.
  349. libgcc2-2.5.0.patch: Patch libgccc2.c for gcc-2.5.0.
  350. libgcc2-2.5.2.patch: Patch libgcc2.c for gcc-2.5.2.
  351. libio-2.5.patch: Patch the stream library.
  352.  
  353. See VxWorks Archive information in this FAQ for details on how to 
  354. get these files.
  355.  
  356. ---------------------------------------
  357.  
  358. 10. Other C/C++ Compiler tools for VxWorks?
  359.  
  360. WRS re-sells (re-engineered?) CenterLine cfront product and WindC++
  361. Gateway for CenterLine ObjectCenter. They come with browsers, etc. 
  362. Not free.
  363.  
  364. Wind C++ Gateway for ObjectCenter sold by WRS:
  365.  
  366. $995 / user 1-4 copies
  367. $875 / user 5-9 copies
  368.  
  369. Note that this is the cost over and above ObjectCenter.
  370.  
  371. ------------------------------
  372.  
  373. 11. Which cross-debuggers can I use with VxWorks?
  374.  
  375. GDB & other more expensive tools from WRS, MicroTec Research, etc.
  376.  
  377. WRS sells a lightly modified version of xxgdb which has a lousy GUI
  378. interface.  In 5.1 xvxgdb may have been slightly improved -- but the
  379. ObjectCenter C++ with VxWorks solution provides better GUI interface.
  380.       
  381. With a little bit of hacking, regular GDB works just fine.  Personally,
  382. I find GUI to a debugger gets in the way of real work.  I use GNU Emacs
  383. GDB interface which works well and can be easily customized.
  384.  
  385. There might be some old VxWorks customers that also use VxWorks-aware 
  386. dbxtool on Sun machines.  This used to be maintained and sold by SUN
  387. Consulting.
  388.  
  389. If you're only interested in debugging your "application" on VxWorks,
  390. the vxgdb approach (using RPC) works just fine.
  391.  
  392. If you are rather more interested in the guts of the system as well as
  393. your application you might want to spend some time building
  394. cross-debugging tools from generic GDB distribution into VxWorks.
  395.  
  396. ------------------------------------ 
  397.  
  398. 12. What are differences between traditional UNIX and VxWorks?
  399.  
  400. They're both hacks.  UNIX has a larger installed base. :-)
  401.  
  402. Seriously though, similarities end there, IMHO.  VxWorks does have a
  403. lot of UNIX "compatible" routines in the user libraries.  So porting a
  404. UNIX application is not that hard.  But there are enough differences to
  405. make such a port take longer than normally expected.
  406.  
  407. VxWorks runs in one mode.  No protected vs. user mode switching is
  408. done.  Running in supervisor mode on most processors, and not using
  409. traps for system calls, VxWorks can achieve minimal overhead on a given
  410. piece of hardware than UNIX.  Programming on VxWorks can be more tricky
  411. than UNIX for the same reason.
  412.  
  413. UNIX provides resource reclamation; by default, VxWorks does not.  [
  414. editorial: using deleteHooks or whatever, you could implement this on
  415. your own.]  Instead programmers write what they need as needed.  As a
  416. result, the context switch time in VxWorks is on the order of a few
  417. micro-seconds (since there is a lot smaller context to save and
  418. restore). VxWorks does not have full "process"; it only has tasks, or
  419. "threads", or light weight processes as some people like to call them.
  420.  
  421. Like any other multi-threaded environments (or MP environments), care
  422. should be taken when writing multi-tasking code.  Each routine should
  423. be written carefully to be re-entrant (if it is going to be called from
  424. multiple contexts), semaphores are used a lot for this. And static
  425. variables are frowned upon.  Sometimes, when porting a UNIX
  426. application, you may need to add "task variables" for this reason (as
  427. done for rpcLib in VxWorks).
  428.  
  429. VxWorks: minimal interrupt latency (e.g. spl's are quasi-implemented
  430. as semaphores).  Traditional UNIX: high interrupt latency (e.g. spl's
  431. are implemented as interrupt lock and unlock calls).
  432.  
  433. VxWorks: priority interrupt-driven preemption, optional round-robin
  434. time-slicing.  Traditional UNIX: prioritized round-robin preemptive
  435. time-slicing.  Since VxWorks is just a glorified "program" it can be
  436. changed and customized pretty easily.  Task scheduling can be
  437. customized as desired, for example.
  438.  
  439. VxWorks networking code, however, is very UNIX compatible [editorial:
  440. it is essentially "ported" version of BSD UNIX TCP/IP code -- tahoe
  441. release ].  It is relatively easy to port socket based code to
  442. VxWorks.  [ editorial: except the not-so-compatible hostLib routines,
  443. etc.]
  444.  
  445. VxWorks most definitely is not a "realtime UNIX", or a varient of UNIX
  446. as often misunderstood by some people.  The confusion perhaps is due to
  447. the fact that UNIX hosts are used most widely to develop applications
  448. for VxWorks (and VxWorks itself).
  449.  
  450. There are a lot more differences!  In short, UNIX is a nice system to
  451. run emacs on.  VxWorks is much better at playing pin-ball game
  452. machines.
  453.  
  454. Having said all this, I should also note that there are Realtime capable
  455. UNIX systems out there.  Most of these systems do not come close to
  456. the capabilities and performance of VxWorks in realtime processing.
  457. An exception to this might be QNX, which is a very well designed
  458. Realtime POSIX operating system.  
  459.  
  460. ----------------------------
  461.  
  462. 13. What are the performance/benchmark numbers for WIND kernel?
  463.  
  464. A WRS VxWorks 5.1 Benchmark Report hot off the press:
  465.  
  466. Benchmark numbers based on: mv167-25Mhz, 5.1
  467.  
  468.                                 Cache    Cache 
  469. Key Measurements                        Enabled    Disabled
  470.  
  471. Raw Context Switch Time                 4 us    14 us
  472. Cyclic Test Time                        172 us  638 us
  473. Suspend/Switch/Resume/Switch                23 us   86 us
  474.  
  475. Kernel Timings
  476.  
  477. Task Related
  478. taskSpawn                           124 us  370 us
  479. taskInit                            58 us   181 us
  480. taskActivate                        12 us   33 us
  481. taskDelete                          101 us  303 us
  482. Task Create / Delete                    249 us  684 us
  483. taskLock
  484.         CASE 1: no lock                 3 us    4 us
  485.         CASE 2: lock exists                 2 us    5 us
  486. taskUnlock
  487.         CASE 1: no lock                 2 us    12 us
  488.         CASE 2: lock exists                 5 us    6 us
  489. taskSuspend
  490.         CASE 1: ready task                  11 us   30 us
  491.         CASE 2: pended task                 9 us    19 us
  492.         CASE 3: suspended task              8 us    19 us
  493.         CASE 4: delayed task                9 us    19 us
  494. taskResume
  495.         CASE 1: ready task                  6 us    19 us
  496.         CASE 2: pended task                 10 us   19 us
  497.         CASE 3: suspended task              13 us   30 us
  498.         CASE 4: delayed task                9 us    18 us
  499.  
  500. Semaphore Related
  501. semBCreate                          66 us   152 us
  502. semCCreate                          46 us   150 us
  503. semMCreate                          45 us   139 us
  504. semDelete
  505.         Binary                      49 us   157 us
  506.         Counting                        49 us   163 us
  507.         Mutual Exclusion                    48 us   157 us
  508. semGive
  509.         CASE 1: tasks in queue  
  510.         Binary                      18 us   44 us
  511.         Counting                        20 us   46 us
  512.         Mutual Exclusion                    25 us   59 us
  513.         CASE 2: no tasks in queue       
  514.         Binary                      4 us    8 us
  515.         Counting                        5 us    11 us
  516.         Mutual Exclusion                    6 us    15 us
  517.  
  518. semTake
  519. CASE 1: semaphore available     
  520.         Binary                      4 us    9 us
  521.         Counting                        5 us    11 us
  522.         Mutual Exclusion                    5 us    13 us
  523.         CASE 2: semaphore unavailable   
  524.         Binary                      10 us   25 us
  525.         Counting                        11 us   27 us
  526.         Mutual Exclusion                    4 us    12 us
  527. Semaphore Give / Take
  528.         Binary                      7 us    15 us
  529.         Counting                        9 us    21 us
  530.         Mutual Exclusion                    10 us   26 us
  531. semFlush
  532.         Binary                      11 us   20 us
  533.         Counting                        11 us   20 us
  534.         Mutual Exclusion                    10 us   16 us
  535.  
  536. Miscellaneous Operating System Timings
  537.  
  538. Message Queue Related
  539. msgQCreate                          93 us   280 us
  540. msgQDelete                          71 us   229 us
  541. msgQSend
  542.         CASE 1: task pending                39 us   102 us
  543.         CASE 2: no tasks pending                23 us   64 us
  544.         CASE 3: queue full                  14 us   45 us
  545. msgQReceive
  546.         CASE 1: message available               20 us   62 us
  547.         CASE 2: message unavailable             15 us   41 us
  548.  
  549. Memory Related
  550. malloc                          28 us   81 us
  551. free                                32 us   104 us
  552.  
  553. Watchdog Related
  554. wdCreate                            42 us   106 us
  555. wdDelete
  556.         CASE 1: timer started               48 us   160 us
  557.         CASE 2: timer not started               44 us   150 us
  558. wdStart
  559.         CASE 1: timer in queue              20 us   70 us
  560.         CASE 2: no timer in queue               18 us   55 us
  561. wdCancel                            11 us   34 us
  562.  
  563. Floating-Point  
  564. robot application                       18 sec  51 sec
  565.  
  566. [ editorial:
  567. If you care enough to count pico-seconds in comparing realtime
  568. kernels, you  might want to actually get each of the evaluation copies
  569. from various vendors and test them yourself.  But remember benchmarks
  570. are misleading and almost always biased and inaccurate.  Given similar
  571. benchmark numbers, give or take a few microseconds, etc., your dollars
  572. are better spent in getting something you'll enjoy using. ]
  573.  
  574. -----------------------------
  575.  
  576. 14. What are the performance/benchmark numbers for VxWorks TCP/IP?
  577.  
  578. According to WRS, using VxWorks 5.1 on mv167-25mhz (i82596 ethernet)
  579.  
  580.                  w/ cache      w/o cache enabled
  581.  TCP/IP Throughput (KB/sec)      859 KB/sec      682 KB/sec
  582.  
  583. No numbers available on latency.
  584.  
  585. Using a reasonably fast processor 25Mhz MC68040 and a reasonably well
  586. made ethernet chip like SONIC or LANCE put together on a reasonable board
  587. design will achieve TCP throughput close to full bandwidth of ethernet.
  588.  
  589. [ editorial:
  590. This, of course, is rather slow in comparison with other fast
  591. implementations, since a 16Mhz MC68020 with onboard LANCE 
  592. or a PeeCee with an ethernet board can easily do the same.
  593. I know at least one implementation based on el-cheapo i486-50mhz/EISA/SONIC
  594. that does: 1170KB/sec.  ]
  595.  
  596. ---------------------------------
  597.  
  598. 15. What is the VxSim VxWorks Simulator?
  599.  
  600. Propaganda from WRS:
  601.  
  602.  It really is VxWorks running under UNIX!  So sure it
  603.  is not realtime, although all tasks and resources interact
  604.  in the same way -- great for prototyping "high-level" code.
  605.  Using the simulator saves wear and tear on h/w.  It (only)
  606.  allows sytem level debugging with native GDB.
  607.  
  608.  Portably written object code compiled for VxSim (for SunOS SPARC)
  609.  will usually load without recompilation on a SPARC target.  And,
  610.  BTW under 5.1 switching from one architecture to anthoer really is
  611.  pretty painless.
  612.  
  613. ------------------------------
  614.  
  615. 16. Can I use one boot EPROM for multiple boards on the same net?
  616.  
  617. WRS provides EPROMs with a default bogus bootline, virtually all
  618. boards come with non-valiatile RAM which is set as soon as the user
  619. fills in his parameters (which include CPU #).  Therefore 1 EPROM may
  620. be duplicated and used in all boards at a site.  If the board does not
  621. contain nvram then ROMs have to be specially blown, unless a custom
  622. scheme for reading some switches or something is coded to index into a
  623. bootline table.  In 5.1 BOOTP is supported -- no more repeated EPROM
  624. burning is necessary.
  625.  
  626. ------------------------------
  627.  
  628. 17. What's the deal with 68881 FPU code in interrupt handlers?
  629.  
  630. In general, FP context is optimally saved only when the scheduler
  631. notices that the new task coming in also uses the fpu (VX_FP_TASK).
  632. ISRs don't.  If no tasks are using the FPU then ISRs may go ahead,
  633. unless different levels of ISRs could interrupt each other and again
  634. cause a protocol violation.
  635.  
  636. And Stan Schneider says,
  637.  
  638. You have to set the "VX_FP_TASK" option flag when you spawn your task.  You
  639. also need to make sure you don't use the FPU in any interrupt service
  640. routines.  Even if your code uses no floating point, some (brain-dead)
  641. compilers save some FPU registers at the start of all routines if there's any
  642. floating point in the file.  That's not usually a problem if you're using the
  643. gcc compiler (at least with the "-O" flag on).  A sure way to check is via the
  644. dissassembler.
  645.  
  646. And Leonid Rosenboim says,
  647.  
  648. This problem is quite common, and really simple to fix, all you have to
  649. do is make sure that all tasks that do a float operation ever, will
  650. be spawned with the VX_FP task option set. This is the best and only
  651. solution. Also, if you run floating operations in ISRs care must be taken,
  652. to call fppSave() and fppRestore(). Also if you are using 5.1 on a 68040,
  653. there is a bug in the compiler that you must work around:
  654.  
  655.     If you write an ISR that uses float instructions, it is not
  656.     enougth just to call fppSave()/fppRestore(), since the compiler
  657.     for 68040 inserts FP instructions BEFORE your first line
  658.     of C code, hence you need to write a dummy ISR that:
  659.  
  660.      dummyIsr()
  661.     {
  662.         fppSave( .. );
  663.         yourRealISR();
  664.         fppRestore( ... );
  665.     }
  666.  
  667. And Kent Long says,
  668.  
  669. This was indeed a real problem in the context switch code in 5.0.x which
  670. was corrected in 5.1.
  671.  
  672. In both OS versions, there is an optimization that causes the FP context
  673. to be swapped only when the incoming task has been spawned with the
  674. floating point (VX_FP) flag set.  In 5.0.x, the copying-in of the FP context
  675. was done via an fppSave() call.  This created problems if a new FP
  676. task was created after a previous FP task had been pre-empted by a non-FP
  677. task in the middle of an instruction.  The new task ended up with a 
  678. mid-instruction context (which causes the protocol violation), and the 
  679. old swapped-out FP task ultimately ended up with its context set to IDLE 
  680. (which is equally incorrect).
  681.  
  682. In 5.1, the FP context initialization was changed so that when a task
  683. is created, a pre-defined IDLE frame is copied into that tasks's context.
  684. Since there is no assumption about current FP state (as with fppSave),
  685. task creation is now decoupled from the regular switch logic.
  686.  
  687.  
  688. ------------------------------
  689.  
  690. 18. Why does ls() not work on netDrv devices?
  691.  
  692. Because the way directory information retrieval IOCTL calls are not acompatible
  693. between different types of "filesystems" in VxWorks.  Another reason why
  694. some think VxWorks filesytem does not exist; they're just a collection of
  695. ioDevice drivers, and there is not a real consistent "design" to it.
  696.  
  697. The lsOld() should work on "filesystems" that does not support ls().
  698.  
  699. Chuck Mead proposes the following special routine in case lsOld() does not
  700. work for you:
  701.  
  702.  
  703. #include "vxWorks.h"
  704. #include "bootLib.h"
  705.  
  706. #define RSHD 514
  707.  
  708. STATUS lsHost(path)
  709.    char  *path ;
  710. {
  711.    char *lsString;
  712.    int dataSock ;
  713.    int n ;
  714.    char nextChar ;
  715.  
  716.    extern BOOT_PARAMS sysBootParams ;
  717.    extern char *sysBootHost ;
  718.  
  719.    if (path == (char *) NULL)
  720.    {
  721.       lsString = (char *) malloc(4) ;
  722.       strcpy(lsString, "ls") ;
  723.    }
  724.    else
  725.    {
  726.       lsString = (char *) malloc(strlen(path) + 5) ;
  727.       sprintf(lsString, "%s%s", "ls ", path) ;
  728.    }
  729.  
  730.    dataSock = rcmd (sysBootHost, RSHD, sysBootParams.usr,
  731.         sysBootParams.usr, lsString, (int *) NULL) ;
  732.  
  733.    if (dataSock == ERROR)
  734.    {
  735.       printf("Error opening socket") ;
  736.       return (ERROR) ;
  737.    }
  738.  
  739.    n = fioRead(dataSock, &nextChar, 1) ;
  740.    while (n == 1)
  741.    {
  742.       printf("%c",nextChar) ;
  743.       n = fioRead(dataSock, &nextChar, 1) ;
  744.    }
  745.  
  746.    close(dataSock) ;
  747. }
  748.  
  749. ------------------------------
  750.  
  751. 19.  Why can't I do ".." at top level directories or NFS mount points?
  752.  
  753. Because, again, VxWorks does not really have a "filesystem" as most people
  754. understand it.  The top level directories are just implemented as device
  755. driver "node", which is used to identify the ioDev associated with the
  756. specific VxWorks "filesystem".  Since there is no underlying filesystem
  757. layer, the story ends there.  When you're at the top of the directory
  758. hierarchy within a given ioDev/filesytem, you simply cannot do "..".
  759.  
  760. ------------------------------
  761.  
  762. 20. Why do I have trouble using relative symbolic links with NFS?
  763.  
  764. See [Q: Why can't I do ".." at top level directories or NFS mount points?]
  765. above.  This is just another problem caused by the fact that a real filesystem
  766. does not exist for VxWorks.  NFS client implementation actually does implement
  767. the symbolic links correctly, using lookup and readlink.  The problem is
  768. due to the fact that, for some relative links that use ".." or whatever, that
  769. crosses over filesystems, VxWorks cannot have underlying subsystem that will
  770. handle file pathname to device mapping.  
  771.  
  772. Using absolute symbolic links work just fine (i.e. full path name from top).
  773.  
  774. ------------------------------
  775.  
  776. 21. X for VxWorks
  777.  
  778. WRS has a product called windX which supports Motif. There is also
  779. libX11 contribution in the VxWorks Archive. This package is perhaps
  780. fairly old and out of date. Essentially, to port X stuff to VxWorks
  781. you'll need to do make sure code is re-entrant everywhere.  There is a
  782. "multi-thread" safe version of Xlib available somewhere on the net, one
  783. might try porting that.  There are also vendors that have built X servers
  784. using VxWorks.  Jupiter Systems, in Alameda, makes high-end X server
  785. machines based on VxWorks.  Other X terminal vendors (HP?) also use VxWorks.
  786.  
  787. -----------------------------
  788.  
  789. 22. IEEE-488 (GPIB) driver for VxWorks
  790.  
  791.  - National Instruments has lots of GPIB stuff
  792.  - THEMIS computers has TSVME-409 whic hincludes a GPIB interface.
  793.  - APLABS probably has some GPIB stuff too.
  794.  
  795. -----------------------------
  796.  
  797. 23. How does one disable NFS client caching?
  798.  
  799. VxWorks caches read and write requests in NFS client code.
  800. To completely disable read and write cache, set nfsCacheSize to 0.
  801. To just flush the write cache as needed, use nfsCacheFlush() or
  802. FIOSYNC ioctl().
  803.  
  804. ------------------------------
  805.  
  806. 24. Why doing a lot of slipInit()/slipDelete() cause routing table corruption?
  807.  
  808. This is due to a bug in slipDelete() and/or if_dettach().  slipDelete()
  809. calls if_dettach() to clean up after itself (SLIP network interface driver).
  810. Not only is if_dettach() misspelled, it also doesn't do a complete job.
  811. One deficiency is that it does not delete routes that are pointing to the
  812. interface being deleted.  This is remedied via another function that deletes
  813. all routes for a give netif device driver.  [ ifRouteDelete() ??? ]
  814. slipDelete() does call this routine to delete routes.  Another problem is
  815. that if_dettach() does not delete a pointer to the netif device driver 
  816. structure in the global in_ifaddr linked list.  The in_ifaddr list is
  817. used by the network kernel code to find IP addresses of available network
  818. interfaces, among other things.  This lack of proper cleanup turns out to 
  819. be a rather hard-to-find memory corruption problem in network code, and
  820. usually manifests itself as routing table corruptions.
  821.  
  822. To fix this add the following routine, and call it right after calling
  823. slipDelete:
  824.  
  825. void in_ifaddr_remove(ifp)
  826.         struct ifnet *ifp;  /* ifp = ifunit("sl0") before slipDelete() called */
  827. {
  828.         struct in_ifaddr *ia, *prev_ia;
  829.  
  830.         if (!ifp) 
  831.                 return;
  832.  
  833.         prev_ia = 0;
  834.  
  835.         for (ia = in_ifaddr; ia; ia = ia->ia_next) {
  836.                 if (ia->ia_ifp == ifp) {
  837.                         if (prev_ia)
  838.                                 prev_ia->ia_next = ia->ia_next;
  839.                         else
  840.                                 in_ifaddr = ia->ia_next;
  841.                         return;
  842.                 }
  843.                 prev_ia = ia;
  844.         }
  845. }
  846.  
  847. This, along with the route cleanup, should be incorporated into if_detach().
  848.  
  849. ------------------------------
  850.  
  851. 25. How does one get better network I/O performance?
  852.  
  853. Most of the overhead is due to socket to network core interface overhead.
  854. The copy that happens between the socket layer and network core code
  855. can be avoided by using the routines in uipc_socket.c (as in BSD tahoe
  856. release code available on various archive sites) and using mbufs directly.
  857.  
  858. You can also try using raw etherLib routines.  However, etherLib also
  859. does copying between user application and network driver.
  860.  
  861. If you must use the socket interface (sockLib), make sure you tune the
  862. socket level buffers sizes to optimal values using setsockopt() calls
  863. SO_SNDBUF and SO_RCVBUF.  You might also just try changing the globals
  864. that control the following default parameters to larger numbers (all
  865. the way upto 48K):
  866.  
  867.  tcp_sendspace (default 4K)
  868.  tcp_recvspace (default 4K)
  869.  udp_sendspace (default 2K)
  870.  udp_recvspace (default 4K)
  871.  
  872. To get around extra latency in some cases, you might turn on TCP_NODELAY
  873. option on TCP sockets.
  874.  
  875. ------------------------------
  876.  
  877. 26. How does one troubleshoot a backplane driver malfunction?
  878.  
  879. There are a few rules of thumb:
  880.  
  881.  1) Try the simplest case first -- use polling instead of
  882.     bus or mailbox interrupts and software test-and-set
  883.     instead of hardware test-and-set.  See if this
  884.     works first.  And then try hardware test-and-set
  885.     and then the desired mailbox or bus interrupt.
  886.  
  887.  2) Use bpShow() to see what's up.  Also look for magic code
  888.     0x1234 in share mem area being used for messages,
  889.     and verify heartbeat is being incremented.
  890.     At the "anchor" you should see the magic code (4 bytes)
  891.     followed by a long word which should be incrementing (the
  892.     heartbeat) every second.
  893.  
  894.  3) Verify all memory mapping and make sure there's no
  895.     address conflicts on the bus, and the anchor area is
  896.     properly set up.  If the anchor and ring buffer area
  897.     is on a CPU, make sure the sysLib.c:sysHwInit()
  898.     does the right thing to allow access to on-board memory
  899.     by other CPU's in the chassis.  Be careful, as some
  900.     VxWorks BSP's turn off on-board memory access by other CPU's
  901.     if the CPU is not processor 0.  This should be changed
  902.     if your anchor CPU is not processor 0 (first CPU in
  903.     VME chassis/backplane) -- this is a boot time configuration 
  904.     parameter [ based on the assumption that bpInit() will be done
  905.     by the processor 0 ].
  906.  
  907.  4) Make sure bus controller is functioning properly.
  908.     Some combinations of boards might not work well
  909.     especially if your system controller board
  910.     arbitrates the bus in one way and other boards
  911.     expect to be arbitrated in a different way.
  912.     Sometimes you might need to use a separate
  913.     system controller.  Of course, also make sure
  914.     you only have one bus master.  And that your VME
  915.     bus strappings (BREQ, IACK daisychains) are right.
  916.  
  917.  5) Call Wind River's VxWorks tech-support... 
  918.  
  919. ------------------------------
  920.  
  921. 27. How do I add select support to my driver?
  922.  
  923. #include "selectLib.h"
  924. ...
  925.  
  926. xxx_init(...)
  927. {
  928.      ...
  929.      selWakeupListInit(&xxxdev->selwakeupList);
  930.      ...
  931. }
  932.  
  933. xxx_ioctl(...)
  934. {
  935.      ...
  936.      switch(request_type) {
  937.      ...
  938.      case FIOSELECT:
  939.           selNodeAdd(&xxxdev->selwakeupList,
  940.                (SEL_WAKEUP_NODE *)request_arg);
  941.           if ((selWakeupType((SEL_WAKEUP_NODE*)request_arg) == SELREAD)
  942.                && readable_condition_is_met)
  943.                selWakeup((SEL_WAKEUP_NODE*)request_arg);
  944.           if ((selWakeupType((SEL_WAKEUP_NODE*)request_arg) == SELWRITE)
  945.                && writable_condition_is_met)
  946.                selWakeup((SEL_WAKEUP_NODE*)request_arg);
  947.           break;
  948.      ...
  949.      case FIOUNSELECT:
  950.           selNodeDelete(&xxxdev->selWakeupList,
  951.                (SEL_WAKEUP_NODE*)request_arg);
  952.           break;
  953.      ...
  954.      }
  955. }
  956.  
  957. And, add calls to selWakeup() as appropriate in your interrupt handlers
  958. and read/write routines as selective conditions are toggled or satisfied.
  959.  
  960. ------------------------------
  961.  
  962. 28. bind() gets EADDRINUSE, how do I fix it?
  963.  
  964. Fix: do setsockopt() SO_REUSEADDR
  965.  
  966. ------------------------------
  967.  
  968. 29. Common errors in interrupt handlers with floating point co-proc hardware
  969.  
  970. Don't forget to use:
  971.  fppSave()
  972.  fppRestore()
  973.  
  974. Interrupt handler encapsulation code doesn't always save fpp registers for you.
  975.  
  976. ------------------------------
  977.  
  978. 30. Finding entry point of a given module using its name
  979.  
  980. Example from a poster in vxworks newsgroup (who?):
  981.  
  982.  
  983.  FUNCPTR  start;  /* found entry point goes here */
  984.  UINT8    symType;
  985.  int      tid;
  986.  
  987.  if(symFindByName(sysSymTbl,"_nlos_start",(char**)&start,&symType)==OK){
  988.     /* taskSpawn(name,priority,options,stacksize,entryAddress,arg1,..) */
  989.  
  990.     tid = taskSpawn("nlos",TASK_PRI_NLOS,SPAWN_OPTS,STACK_SIZE_NLOS,start,
  991.     arg1,arg2,.....);
  992.  }
  993.  
  994. ------------------------------
  995.  
  996. 31. The problem with irint() in earlier (5.0.2 ?) releases
  997.  
  998. The problem:
  999.  
  1000.  /* Include Files */
  1001.  #include "vxWorks.h"
  1002.  #include "math.h"
  1003.  
  1004.  long irint_count = 0;
  1005.  
  1006.  sinTest()
  1007.  {
  1008.       int sinTable;
  1009.  
  1010.       while(1)
  1011.       {
  1012.            sinTable = irint(sin(4./1024.*(2.*3.14))*10.);
  1013.            irint_count++;
  1014.       }
  1015.  }
  1016.  
  1017.  
  1018.  % cc68k -I/vxworks/vw/h -c sinTest.c
  1019.  
  1020.  -> ld < sinTest.o
  1021.  
  1022.  /* 0x08 Option = VX_FP_TASK within taskLib.h */
  1023.  -> taskSpawn ("sinTest", 100, 0x08, 4000, sinTest)
  1024.  /* OR without the Floating Point Option */
  1025.  -> sp sinTest
  1026.  
  1027.  -> irint_count
  1028.  
  1029.  Bus Error
  1030.  Program Counter: 0xb0ac0124
  1031.  Status Register: 0x3004
  1032.  Access Address : 0xb0ac0120
  1033.  Special Status : 0x01e6
  1034.  Task: 0xfcb82c "sinTest"
  1035.  
  1036. The answer:
  1037.  
  1038. Submitted-by wrs!yuba!kent@uunet.uu.net  Fri Sep 27 18:55:25 1991
  1039. Submitted-by: wrs!yuba!kent@uunet.uu.net (Kent Long)
  1040.  
  1041.  > In the function irint, there is a bug that sets the floating point
  1042.  > Exception enable byte register to random values.  Here is the
  1043.  > disasembled code:
  1044.  >
  1045.  >                         _irint:
  1046.  > 00e034  4e56 0000                LINK  .W    A6,#0
  1047.  > 00e038  f227 6b80                FMOVE .X    F7,-(A7)
  1048.  > 00e03c  f22e 5780 0008           FMOVE .D    ($8,A6),F7
  1049.  > 00e042  f22e 6380 0008           FMOVE .L    F7,($8,A6)
  1050.  > 00e048  202e 0008                MOVE  .L    ($8,A6),D0
  1051.  >
  1052.  > 00e04c  f201 9000                FMOVE .L    D1,#<FPCR>
  1053.  
  1054. <insert audible groan here>
  1055.  
  1056.  > 00e050  504f                     ADDQ  .W    #8,A7
  1057.  > 00e052  4e5e                     UNLK        A6
  1058.  > 00e054  4e75                     RTS
  1059.  >
  1060.  >    Line 0e04c is the line that sets the FPCR to some random value,
  1061.  > as D1 is unknown going into the function.  I rewrote the routine,
  1062.  > without line 0e4c, and everything works fine.
  1063.  >    If anyone out there knows why this line was put in, I would
  1064.  > appreciate knowing.  Hope this may keep someone else from spending
  1065.  > a couple of days tracking down this problem.
  1066.  
  1067. I have confirmed that this is a bug in all 5.x versions of VxWorks for
  1068. the 68k.  (In fact, it's in 4.0.2 as well.)  As Mark correctly observed,
  1069. the problem is that the FPCR register is erroneously being set.
  1070.  
  1071. This was a simple cut-and-paste error in the VxWorks source module.
  1072. The line which sets the FPCR should instead be restoring the value
  1073. of FP7, which was saved on the stack earlier (as you can see in the
  1074. code above).  So, it would appear that another side effect of this
  1075. bug is to clobber FP7.
  1076.   
  1077. The fix is pretty simple.  The following patch scripts should get things
  1078. back to what they should be.  (You can just include the appropriate lines
  1079. in your startup script, or enter them from the VxWorks shell.)
  1080.  
  1081. For VxWorks 5.0.1 and 5.0.2:
  1082.  
  1083.         pMathPatch = mathHardIrint + 0x18;
  1084.         *pMathPatch = (short) 0xf21f;
  1085.         pMathPatch = mathHardIrint + 0x1a;
  1086.         *pMathPatch = (short) 0x4b80;
  1087.  
  1088. This bug does NOT affect VxWorks 5.1.  The disassembled code for Vx5.1,
  1089. (HK68K/V3D) is:
  1090.                         _mathHardIrint:
  1091. 2042e58  4e56 0000                LINK  .W    A6,#0
  1092. 2042e5c  f227 6800                FMOVE .X    F0,-(A7)
  1093. 2042e60  f22e 5400 0008           FMOVE .D    (0x8,A6),F0
  1094. 2042e66  f22e 6000 0008           FMOVE .L    F0,(0x8,A6)
  1095. 2042e6c  202e 0008                MOVE  .L    (0x8,A6),D0
  1096. 2042e70  f21f 4800                FMOVE .X    (A7)+,F0
  1097. 2042e74  4e5e                     UNLK        A6
  1098. 2042e76  4e75                     RTS
  1099.  
  1100. Kent Long further clarifies,
  1101.  
  1102. This was indeed a real problem in the context switch code in 5.0.x which
  1103. was corrected in 5.1.
  1104.  
  1105. In both OS versions, there is an optimization that causes the FP context
  1106. to be swapped only when the incoming task has been spawned with the
  1107. floating point (VX_FP) flag set.  In 5.0.x, the copying-in of the FP context
  1108. was done via an fppSave() call.  This created problems if a new FP
  1109. task was created after a previous FP task had been pre-empted by a non-FP
  1110. task in the middle of an instruction.  The new task ended up with a 
  1111. mid-instruction context (which causes the protocol violation), and the 
  1112. old swapped-out FP task ultimately ended up with its context set to IDLE 
  1113. (which is equally incorrect).
  1114.  
  1115. In 5.1, the FP context initialization was changed so that when a task
  1116. is created, a pre-defined IDLE frame is copied into that tasks's context.
  1117. Since there is no assumption about current FP state (as with fppSave),
  1118. task creation is now decoupled from the regular switch logic.
  1119.  
  1120. ------------------------------
  1121.  
  1122. 32. What are +T, +I thingies in the "i" output?
  1123.  
  1124. The following is an excellent description of all these symbols by many people
  1125. on the net, including "Fred J. Roeber" and others:
  1126.  
  1127. Description                                 Status symbol
  1128. =====================================       ===============
  1129. <blah> and task's priority inherited         <blah> + I                    
  1130. Delayed and suspended                        DELAY+S
  1131. Pended and suspended                         PEND+S
  1132. Pended and Delayed                           PEND+T
  1133. Pended, delayed and suspended                PEND+S+T
  1134.  
  1135. The DELAY state indicates that the task has done some sort of delayed
  1136. call while PEND means the task has done something that caused it to
  1137. block like trying to semTake a semaphore someone else was holding.
  1138. PEND+T means that the task is both delaying and pending; it has done a
  1139. semTake with a timeout. +I means that the task has (temporarily)
  1140. inherited a higher priority through the use of a mutex semaphore.
  1141.  
  1142. The priority inheritance protocol also accounts for the ownership of
  1143. more than one mutual exclusion semaphore at a given time.  A task in
  1144. such a situation will execute at the priority of the highest priority
  1145. task blocked on any of the owned resources.  The task will return to
  1146. its normal, or standard, priority only after relinquishing all of the
  1147. mutual exclusion semaphores with the inversion safety option enabled.
  1148.  
  1149. If you use nested mutex semaphores with priority inheritance turned on then
  1150. when a task inherits a high priority due to some inner semaphore it owns,
  1151. it doesn't lose that priority until it relinquishes all the semaphores it
  1152. holds.  This doesn't quite follow the rules for priority inheritance (to
  1153. the extent that there really are any rules) in that normally, a task's
  1154. inherited priority should decrease as it releases each nested semaphore to
  1155. whatever the priority ceiling is for the semaphores it still holds.  Getting
  1156. this incremental priority reduction to work right in practice, though,
  1157. is extremely difficult (some of the SUN papers on the Solaris real time
  1158. scheduling indicate that this was one of the hardest things for SUN to
  1159. get right in their OS upgrades).  Given that VxWorks is a real time embedded
  1160. OS, I, for one, don't care if WRS uses the current implementation even
  1161. though it isn't "pure" because the result is a more reliable implementation
  1162. that runs more deterministically.  Anyway, my guess is that you will find
  1163. that you have some nested semaphore code where you are doing something
  1164. after releasing one of the nested semaphores that shouldn't be done at a
  1165. high priority.  
  1166.  
  1167. ------------------------------
  1168.  
  1169. 33. Gotchas w.r.t watchdogs
  1170.  
  1171. watchdog handlers run at interrupt level.  You should not use
  1172. routines that can block in interrupt level code.  Frequent mistakes:
  1173. using printf() in watchdog routines -- use logMsg() instead.
  1174.  
  1175. ------------------------------
  1176.  
  1177. 34. Is it possible to delete a memory partition in VxWorks?
  1178.  
  1179. No.  memPartDestroy() is not really implemented.  Perhaps it will
  1180. be in the future.  Currently it just returns ERROR.  
  1181.  
  1182. ------------------------------
  1183.  
  1184. 35. rename() does not work in netDrv and nfsDrv filesystems, why?
  1185.  
  1186. Because rename() is not implemented for netDrv (although it could be),
  1187. and nfsDrv does not implement rename() completely either.
  1188.  
  1189. Talk to WRS to get these fixed.
  1190.  
  1191. ------------------------------
  1192.  
  1193. 36. Free NFS Server for VxWorks
  1194.  
  1195. A free, incomplete, sample implementation (i.e. hack) of NFS Server
  1196. for VxWorks is available in:
  1197.  
  1198.  ftp.netcom.com:/pub/hjb/vxnfsd.tar.gz
  1199.  
  1200. There is a README file there that describes further details.  The current
  1201. snapshot of this implementation is a result of a couple of days of 
  1202. hacking, doesn't do everything right, and intended for educational and
  1203. further hacking purpose.
  1204.  
  1205. There is someone else who's porting the MS-DOS PC-based nfs server (SOSS?)
  1206. to VxWorks.  Not clear on its availability yet (let me know!)
  1207.  
  1208. ------------------------------
  1209.  
  1210. 37. Free SNMP for VxWorks
  1211.  
  1212. hoff@bnlux1.bnl.gov (Lawrence T. Hoff) reports,
  1213.  
  1214. We ported the CMU SNMPv2 code to vxWorks 5.1. This latest round of posts has
  1215. prompted me to put it in anonymous ftp (ctrldev1.rhic.bnl.gov --
  1216. 130.199.96.82).
  1217.  
  1218. SNMP Research sells VxWorks compatible port of their SNMP implementation
  1219. with support.  Their's cost $$$$$, though.
  1220.  
  1221. ------------------------------
  1222.  
  1223. 38. What third party products are available for VxWorks?
  1224.  
  1225. I tried to include the third party products, list of consultants,
  1226. services, goodies, etc. available for VxWorks from various sources but...
  1227. there are too many to list here.  Instead,
  1228.  
  1229. the file:
  1230.  
  1231.  ftp.netcom.com:/pub/hjb/vxworkers.gz
  1232.  
  1233. is updated in realtime to contain a list of individuals and companies
  1234. that offer help, services (paid or unpaid), and goods for VxWorks.
  1235.  
  1236. To get a copy (if you don't have ftp access) or to be listed in this file, 
  1237. please contact or send info in ASCII to:
  1238.  
  1239.  hjb@netcom.com.
  1240.  
  1241. ------------------------------
  1242.  
  1243. 39. What kind of products have been developed using VxWorks?
  1244.  
  1245.  - Flight simulators
  1246.  - Radio and optical telescopes
  1247.  - Automative ABS & realtime suspension
  1248.  - Naviation systems
  1249.  - Deep sea instrumentation
  1250.  - PBXs
  1251.  - Traffic control systems
  1252.  - Modems
  1253.  - Sonar systems
  1254.  - Comm/weather satellite test equipment
  1255.  - X terminals
  1256.  - PostScript laser printers
  1257.  - Video Editing, Audio Visual systems
  1258.  - robotics
  1259.  - NFS protocol accelerator product
  1260.  - mass storage tape robot systems
  1261.  
  1262. ---------------------------------
  1263.  
  1264. 40. A complete list of CPU hardware supported by VxWorks
  1265.  
  1266. Complete list of WRS supported BSP's are available in:
  1267.  
  1268.  ftp.netcom.com:/pub/hjb/vxbsp.gz
  1269.  
  1270. VxWorks runs on a lot of different hardware.  Majority of hardware
  1271. supported is based on VME bus.  Porting VxWorks to a new VME board
  1272. based on MC68K takes only a few days, give or take a week, depending
  1273. on your karmic condition at the time.  A lot of the ports are
  1274. initially done by the customers and later "approved" by WRS, for
  1275. which they charge, in order to keep them on "supported" list.
  1276.  
  1277. Porting to a new "architecture" (new processor) takes longer.
  1278. This varies more widely -- from a few months to a few years.
  1279.  
  1280. ---------------------------------
  1281.  
  1282. 41. A complete list of peripheral devices supported by VxWorks
  1283.  
  1284. Complete list of WRS supported BSP's are available in:
  1285.  
  1286.  ftp.netcom.com:/pub/hjb/vxbsp.gz
  1287.  
  1288. VxWorks supports a wide variety of devices.  A lot of device drivers 
  1289. are written both by customers and WRS staff.  There are device drivers
  1290. for almost popular available ethernet chips (except perhaps SEEQ and
  1291. Fujitzu, etc.), various serial chips (MC68681 DUART, Zilog 8350 Sync/Async
  1292. COMM chip, etc.), little I/O thingies in micro-controllers (MC68302
  1293. serial I/O, etc.), SCSI, etc.
  1294.  
  1295. Customers of VxWorks, hackers and other hardware vendors (especially
  1296. VME) usually have a VxWorks driver for their board.  There are drivers
  1297. for FDDI boards, GPIB boards, A/D D/A boards, Graphics controllers,
  1298. frame grabbers, stepper motors, pin-ball machines, and etch-a-sketch
  1299. toy games.
  1300.  
  1301. A list of available device driver for VxWorks can be found in:
  1302.  
  1303.  ftp.netcom.com:/pub/hjb/vxdrivers.gz
  1304.  
  1305. ----------------------------------
  1306.  
  1307. 42. What's with these unbundled "accessories"?
  1308.  
  1309. Propaganda from WRS:
  1310.  
  1311.  The new product/feature doesn't need to wait for the
  1312.  next OS release.  Only the users who want/need it pay for it 
  1313.  lengthens price list which keeps individual items lower
  1314.  but still enhances WRS revenue growth.
  1315.  
  1316.  Please Note:
  1317.  WRS still always adds features to the core product, and
  1318.  has never taken items out of core product to make them
  1319.  unbundled.  Unlike UNIX vendors and others.
  1320.  
  1321. -----------------------------------------
  1322.  
  1323. 43. How come my 5.0.2 BSP isn't available in 5.1, damn it?
  1324.  
  1325. Propaganda from WRS:
  1326.  
  1327.  WRS tries to give customers 1 year warning when any product
  1328.  may be discontinued.  Unfortunately, all the bugs in
  1329.  the notification system are still to be worked out.
  1330.  Complain vehemently to your sales rep. if he didn't
  1331.  keep you informed.  WRS BSP obsoletion policy is primarily
  1332.  based on BSP volume and h/w avalability.
  1333.  
  1334. The 5.1 Guide and Release Notes provide a step by step recipe to
  1335. upgrade from 5.0.2 -- minimal changes,  start by ANISifying.  The BSP
  1336. Port Kit 1.1 provides extensive  info for the masochist.
  1337.  
  1338. ----------------------------------------
  1339.  
  1340. 44. How much is VxWorks?
  1341.  
  1342.  In general: Not free, in fact, quite the opposite.
  1343.  
  1344.  - Development License $23.5K (per project?)
  1345.  - Source $120K.
  1346.  - Target Licenses from $1000 for single quantity to $10 for 100,000+.
  1347.  
  1348. ------------------------------
  1349.  
  1350. 45. What is MicroWorks?
  1351.  
  1352. VxWorks is also available as a kernel-only product (MicroWorks 1.0) for
  1353.  the following processors:
  1354.  
  1355.  i960, 680x0, 683xx
  1356.  
  1357. MicroWorks is -- half the product at a half the price.
  1358.  
  1359. It has no network, native debug, shell, or profiling.  Comes with
  1360. VxMon a very portable ROM monitor to talk with an enhanced vxGDB 2.0
  1361. also included -- this is the debug agent which allows true system
  1362. level debugging in ISR or wherever.  In future, VxWorks may also be
  1363. able to work with VxMon.
  1364.  
  1365. Development License $12,500.
  1366.  
  1367. ------------------------------------
  1368.  
  1369. 46. Other Unbundled Products for VxWorks?
  1370.  
  1371. Other unbundled "accessory" products are: VxMP ($4K) which is an
  1372. extended shared memory capabilities for the kernel allowing semaphores
  1373. and other objects to be manipulated over the backplane transparently
  1374. (really!).
  1375.  
  1376. VxVMI ($3K) is a library of virtual memory interface routines allowing
  1377. text & kernel data protection.  complementary products: BSP Port Kit
  1378. 1.1 ($2K), VxSim 1.0 ($5K), WindX ($3.5K), WindC++ ($2.5K), WindC++
  1379. Gateway for ObjectCenter ($?K's), and Realtime Innovations StethoScope (3K).
  1380.  
  1381. ----------------------------- 
  1382.  
  1383. 47. How can I find out more about VxWorks?
  1384.  
  1385.  Read: comp.os.vxworks
  1386.  Email: inquiries@wrs.com
  1387.  Call: 1-800-KIK-WIND
  1388.  
  1389. ------------------------------
  1390.  
  1391. 48. What other net.resources are available on real-time systems?
  1392.  
  1393. There is at least one other newsgroup devoted exclusively to a particular
  1394. vendor's real-time operating system:
  1395.  
  1396. comp.os.os9  Discussions about the OS/9 operating system.
  1397.  
  1398. Here are some other related newsgroups:
  1399.  
  1400. comp.arch        Computer architecture.
  1401. comp.arch.bus.vmebus    Hardware and software for VMEbus Systems.
  1402. comp.os.misc        General OS-oriented discussion not carried elsewhere.
  1403. comp.realtime        Issues related to real-time computing.
  1404. comp.os.os9        Issues related to OS9 and OS9000 realtime OS.
  1405.  
  1406. There are too many other newsgroups devoted to computer operating systems
  1407. to list here.  The interested reader is advised to check the "newsgroups"
  1408. file on a local news service machine.
  1409.  
  1410. The automatic server for users of pSOS RTOS is now in place.
  1411.  
  1412. PSOSUSER - A list intended for the discussion of topics relating to
  1413.            pSOSystem and other products of Integrated Systems Inc.,
  1414.            Software Components Group.
  1415.  
  1416. Send articles to psosuser@isi.com and administrative requests to
  1417. listserver@isi.com.
  1418.  
  1419. If you aren't already subscribed and would like to, please send a mail
  1420. message to listserv@isi.com containing the following in the body of
  1421. the message
  1422.  
  1423. SUBSCRIBE PSOSUSER <substitute your full name here>
  1424.  
  1425. ------------------------------
  1426.  
  1427. 49. How do i use FIONBIO in 5.0.2 when there is no fcntl()?  
  1428.  
  1429. Use ioctl() instead.
  1430.  
  1431. ...
  1432. {
  1433.     ...
  1434.     int on = 1;    /* turn it on */
  1435.     ...
  1436.     ioctl(fd, FIONBIO, &on);
  1437.     ...
  1438. }
  1439.  
  1440. ------------------------------
  1441.  
  1442. 50. Free lex and yacc for use with VxWorks
  1443.  
  1444. John Winas (winas@phebos.aps.anl.gov) writes,
  1445.  
  1446. I just (moments ago) uploaded the two packages to thor.ncar.ucar.edu where
  1447. the vxWorks archive is.  When ever the maintainer moves it into the release
  1448. area they will be available to everyone.  I named the file lexyacc.tar.Z
  1449. and it contains all of the sources and make files for you to build them.
  1450. It all seems to work perfectly on my sun sparc running 4.1.3.  The
  1451. only thing you have to configure is the full path name to where you wish
  1452. to keep flex so that it can find its skeleton file when you use it to
  1453. lexify your .l files.  Byacc has no skeleton files and simply needs to 
  1454. be in your path.
  1455.  
  1456. This file is now available in:
  1457.  
  1458.     epics.aps.anl.gov:/pub/lexyacc.tar.Z
  1459.  
  1460. I am interested in any bugs found in because we are using them here.  Feel
  1461. free to email me at winans@phebos.aps.anl.gov.
  1462.  
  1463. ------------------------------
  1464.  
  1465. 51. timer_gettime() bug
  1466.  
  1467. [ From: kent@wrs.com (Kent Long) ]
  1468.  
  1469. In article <9311230139.AA21147@focal.com> bobk@focal.com (Bob Klawuhn) writes:
  1470. >I am currently trying to user the timerLib to obtain
  1471. >the amount of time that a timer has left before it
  1472. >expires. I am trying to use the timer_gettime function. 
  1473. >The value that it seems to return is always the time
  1474. >that the start timer was given, not what is left on the
  1475. >timer.
  1476.  
  1477.  
  1478. This is indeed a bug in the 5.1 and 5.1.1 VxWorks versions.
  1479. It is now being tracked as WRS SPR #2673.
  1480.  
  1481. As a workaround, the following could be done following the
  1482. timer_gettime() call, to convert the erroneous results into
  1483. the desired remainder value:
  1484.  
  1485.  
  1486.      #include "private/timerLibP.h"
  1487.      struct timespec timeNow;
  1488.  
  1489.      (void) clock_gettime (CLOCK_REALTIME, &timeNow);
  1490.      TV_SUB (timerid->exp.it_value, timeNow);
  1491.  
  1492. ...which leaves the remainder in it_value.
  1493.  
  1494. ------------------------------
  1495.  
  1496. 52. bogus INCLUDE_TCP_DEBUG
  1497.  
  1498. [ From: hipp@wrs.com (Emily Hipp) ]
  1499.  
  1500. >Bus Error
  1501. >Program Counter: 0x0001c738
  1502. >Status Register: 0x3000 
  1503. >Access Address : 0xbfbfbfd3
  1504. >Special Status : 0x0505
  1505. >Task: 0x3dcc54 "tExcTask"
  1506. >TCP tracing not enabled (use INCLUDE_TCP_DEBUG).  
  1507.  
  1508. This is misleading information.  INCLUDE_TCP_DEBUG is not supported
  1509. as a configAll.h include option.
  1510.  
  1511. [ editorial: 
  1512.   INCLUDE_TCP_DEBUG never got integrated into VxWorks config files.
  1513.   To get around this bug, until WRS fixes it, either unset SO_DEBUG 
  1514.   socket option using getsockopt()/setsockopt(), or call tcpTraceInit() (sp?)
  1515.   which will drag in tcp_debug.o and set the tcp_trace() routine to
  1516.   be called when debug option is set on TCP sockets.
  1517. ]
  1518.  
  1519. ------------------------------
  1520.  
  1521. 53. free ppp for VxWorks
  1522.  
  1523. Is available via anonymous ftp 
  1524.  
  1525.     ftp.netcom.com:pub/peacefulstar/dab/vpppd-1.0.tar.gz
  1526.  
  1527. ------------------------------
  1528.  
  1529. 54. how to disable cache on mc68040 or mc68030 using TT regs?
  1530.  
  1531. [ From: Steve Morris <morriss@smtplink.indigo.co.il> ]
  1532.  
  1533.         /**************************/
  1534.         /* for 68030 (e.g. mv147) */
  1535.         /**************************/
  1536.         
  1537.         /* 2 large areas, R/W, cache disabled */
  1538.         #define TT0_VALUE   0x403f8507  /* from $40000000 -> $77ffffff */
  1539.         #define TT1_VALUE   0x03018507  /* from $02000000 -> $03ffffff */
  1540.         
  1541.         test_tt ()
  1542.         {
  1543.             register int *pVal;
  1544.             int ttVal;
  1545.             
  1546.             pVal = &ttVal;
  1547.             
  1548.             ttVal = TT0_VALUE;
  1549.             asm ("pmove %0,tt0" : : "g" (*pVal));
  1550.             ttVal = TT1_VALUE;
  1551.             asm ("pmove %0,tt1" : : "g" (*pVal));
  1552.         }
  1553.         
  1554.         /**************************/
  1555.         /* for 68040 (e.g. mv167) */
  1556.         /**************************/
  1557.         
  1558.         /* 2 large areas, R/W, cache disabled */
  1559.         #define TT0_VALUE   0x403f8507  /* from $40000000 -> $77ffffff */
  1560.         #define TT1_VALUE   0x03018507  /* from $02000000 -> $03ffffff */
  1561.         
  1562.         test_dtt ()
  1563.         {
  1564.             asm ("movec %0,dtt0" : : "r" (DTT0_VALUE));
  1565.             asm ("movec %0,dtt1" : : "r" (DTT1_VALUE));
  1566.         }
  1567.  
  1568. ------------------------------
  1569.  
  1570. 55. work-arounds for MS-DOS filesystem bug when lseek() past eof
  1571.  
  1572. [From: georg@sgl.ists.ca (Georg Feil)] 
  1573.  
  1574. [editorial: This is a workaround for the bug in VxWorks ms-dos
  1575. implementation which produces incorrect error return on write() after
  1576. lseek() beyond eof.  N.B.: VxWorks versions upto 5.1.1 have buggy IO
  1577. system layer that does not support "correct" write() to normal files.
  1578. When writing to a file via write() expect to check the return value
  1579. even if it is not ERROR. Unlike most other systems (e.g. UNIX) VxWorks
  1580. write() upto version 5.1.1 will return number of bytes actually written
  1581. even when write() was not completely successful on devices that are
  1582. not marked non-blocking and/or are subject to flow control. ]
  1583.  
  1584. There's been enough heated debate on this so I'm sending out my brute force
  1585. workaround. Thanks to Kent Long who managed to let slip enough information
  1586. on the bug to identify the prerequisite: lseek() past the end of file.
  1587.  
  1588. My workaround simply extends a file by writing 0's on the end whenever there
  1589. is a seek past the end. (This may result in a file being extended when it
  1590. shouldn't have been, i.e. no write follows the seek, but what the hell.)
  1591. Use file_seek() below instead of lseek() to seek. Note that file_seek() is
  1592. not meant to be plug-replaceable with lseek(), that feature is not
  1593. required in our system. 'zero8k' is a character array of 8192 zero bytes.
  1594.  
  1595.  
  1596. int file_seek(int fd, int offset)
  1597. /*
  1598.  * Sets the byte offset for the next write or read from a file.
  1599.  * Simple interface to lseek() function. This returns ERR_NONE iff the actual
  1600.  * actual seek offset returned by lseek() exactly matches the desired offset.
  1601.  * 'fd' is the file descriptor to seek on.
  1602.  * 'offset' is the absolute file position to seek to in bytes, where 0 is
  1603.  *          the beginning of file.
  1604.  * Return value is error code (not a VxWorks error code, another type).
  1605.  */
  1606. {
  1607.    STATUS st;
  1608.    struct stat filestat;        /* file status info obtained from fstat() */
  1609.    int aoff;        /* actual seek offset returned by lseek() */
  1610.    long int fillsz;    /* (***) for SPR #2739 kludge */
  1611.    long int fillamt;   /* (***) for SPR #2739 kludge */
  1612.  
  1613.    if (FileDebug && Verbose>=2)  {
  1614.       wprintw(interact,"file_seek(): seeking to offset %d on fd %d\n",
  1615.                                                                   offset,fd);
  1616.    }
  1617.  
  1618.    /* (***) workaround for VxWorks 5.1.1 bug SPR #2739 (write() returns with
  1619.         transfer count too low but errno not set after seeking past current
  1620.         end of file). Note that this may extend the file prematurely, i.e.
  1621.         even if no write() calls follow the seek. */
  1622.    /* get current file size */
  1623.    st=fstat(fd, &filestat);
  1624.    if (st==VX_ERROR)  {
  1625.       if (Verbose>0)  {
  1626.          wprintw(interact,"file_seek(): Error performing fstat() on fd %d: %s\n",
  1627.                                                            fd, vw_errmsg(0));
  1628.       }
  1629.       return(ERR_VXIO);
  1630.    }
  1631.  
  1632.    /* manually extend file using zero writes if seek offset past end of file
  1633.         (note: tried ioctl() with FIOTRUNC, but this only works to shorten
  1634.         files! */
  1635.    if (offset>filestat.st_size)  {
  1636.       /* seek to the end of the file first */
  1637.       errno=0;
  1638.       aoff=lseek(fd, filestat.st_size, SEEK_SET);
  1639.       if (aoff != filestat.st_size)  {
  1640.          /* returned value should always match 'filestat.st_size' */
  1641.          if (Verbose>0)  {
  1642.             wprintw(interact,"file_seek(): Incorrect actual file position after seeking to EOF on fd %d (%d, should be %d) (%s)\n",
  1643.                                      fd, aoff, filestat.st_size, vw_errmsg(0));
  1644.          }
  1645.          return(ERR_VXIO);
  1646.       }
  1647.  
  1648.       /* fill file with zeroes to bring length up to 'offset' */
  1649.       fillsz=offset-filestat.st_size;
  1650.       while (fillsz>0)  {
  1651.          if (fillsz>8192)
  1652.             fillamt=8192;
  1653.          else 
  1654.             fillamt=fillsz;
  1655.  
  1656.          errno=0;
  1657.          aoff=write(fd, zero8k, fillamt);
  1658.          if (aoff == VX_ERROR)  {
  1659.             if (Verbose>0)  {
  1660.                wprintw(interact,"file_seek(): Error writing zeros to %d at pos %d: %s\n",
  1661.                                        fd, ioctl(fd,FIOWHERE,0), vw_errmsg(0));
  1662.             }
  1663.             return(ERR_VXIO);
  1664.          }
  1665.  
  1666.          if (aoff != fillamt)  {
  1667.             if (Verbose>0)  {
  1668.                wprintw(interact,"file_seek(): Bad xfer count writing zeros to fd %d at pos %d (%d, should be %d): %s\n",
  1669.                        fd, ioctl(fd,FIOWHERE,0), aoff, fillamt, vw_errmsg(0));
  1670.             }
  1671.             return(ERR_VXIO);
  1672.          }
  1673.  
  1674.          fillsz -= fillamt;
  1675.       }
  1676.  
  1677.       /* flush the output to disk immediately */
  1678.       st=ioctl(fd, FIOFLUSH, 0);
  1679.       if (st!=VX_OK)  {
  1680.          if (Verbose>0)  {
  1681.             wprintw(interact,"file_seek(): Error flushing zeros written to fd %d at pos %d: %s\n",
  1682.                                        fd, ioctl(fd,FIOWHERE,0), vw_errmsg(0));
  1683.          }
  1684.          return(ERR_VXIO);
  1685.       }
  1686.    }
  1687.  
  1688.    /* (***) end of workaround for VxWorks 5.1.1 bug SPR #2739 */
  1689.  
  1690.  
  1691.    errno=0;
  1692.    aoff=lseek(fd, offset, SEEK_SET);
  1693.    if (aoff == VX_ERROR)  {
  1694.       if (Verbose>0)  {
  1695.          wprintw(interact,"file_seek(): Error seeking to offset %d on fd %d: %s\n",
  1696.                                                      offset, fd, vw_errmsg(0));
  1697.       }
  1698.       return(ERR_VXIO);
  1699.    }
  1700.  
  1701.    /* returned value should always match 'offset' */
  1702.    if (aoff != offset)  {
  1703.       if (Verbose>0)  {
  1704.          wprintw(interact,"file_seek(): Incorrect actual file position after seeking on fd %d (%d, should be %d) (%s)\n",
  1705.                                              fd, aoff, offset, vw_errmsg(0));
  1706.       }
  1707.       return(ERR_VXIO);
  1708.    }
  1709.  
  1710.    return(ERR_NONE);
  1711. }
  1712.  
  1713. ------------------------------
  1714.  
  1715. 56. TCL for VxWorks
  1716.  
  1717. [ From: vanandel@rsf.atd.ucar.edu (Joe Van Andel) ]
  1718.  
  1719. Tool Command Language, version 7.0 (TCL7.0) for VxWorks 5.1 is
  1720. on thor.atd.ucar.edu:~ftp/pub/vx/tclvx7.0.v4.tar.gz
  1721.  
  1722. If you've ever been frustrated that the VxWorks shell is not re-entrant, 
  1723. and has no control flow (e.g. if then else, switch, case ),
  1724. then you will find TCL very useful since it is a very complete language,
  1725. that allows you to add your own application specific commands to
  1726. the interpreter.
  1727.  
  1728. I find it invaluable for system testing, since I register TCL commands for
  1729. all major functionality of my real-time application.  This allows me
  1730. to test most pieces of my data acquisition system from a command line,
  1731. and build nice flexible scripts to test and operate my system.  As a
  1732. matter of fact, I can even invoke specific methods of C++ classes via
  1733. TCL.
  1734.  
  1735. Also, you can control your real-time system from a Unix workstation by
  1736. sending TCL commands from either a TCL or Tk/TCL application (via
  1737. tclTCP).  I find that sending TCL commands (which are just strings) is
  1738. much easier and more flexible than writing a Remote Procedure Call
  1739. (RPC) for each piece of functionality that I need to remotely invoke.
  1740.  
  1741. ------------------------------
  1742.  
  1743. 57. adding default route
  1744.  
  1745. A default route is a route table entry with destination field set to 0.
  1746. To do the equivalent of "route add default gateway metric" in VxWorks,
  1747. do:
  1748.     routeAdd("0",addr_of_gateway);
  1749.  
  1750. ------------------------------
  1751.  
  1752. 58. adjusting network driver MTU size
  1753.  
  1754. VxWorks network driver are compatible (mostly) with tahoe BSD drivers.
  1755. To change MTU you should modify "if_mtu" field of "struct ifnet" you
  1756. pass to ether_attach() or if_attach().
  1757.  
  1758. ------------------------------
  1759.  
  1760. 59. tcpdump like utility for vxworks
  1761.  
  1762. Take a look at a hacked up packet trace program in:
  1763.  
  1764.     ftp.netcom.com:/pub/hjb/vxsniff.c.gz
  1765.  
  1766. [editorial: if you have something better, let me know]
  1767.  
  1768. ------------------------------
  1769.  
  1770. 60. VxWorks performance on i960 -- unofficial benchmark
  1771.  
  1772. [ From: djanssen@mswe.dnet.ms.philips.nl (Ton Janssen, 62203 (TSSW)) ]
  1773.  
  1774. We did some measurements on a Heurikon HK80/V960E.
  1775. Equiped with I960CA on 33MHz. Here they are:
  1776.  
  1777. Test-item            Conditions            Time in us
  1778. ==========================================================================
  1779. - semGive/semTake pair        (binary semaphore)        11,2
  1780. - taskSpawn            (+/- 8 processes active)       790,0
  1781. - taskIdVerify                             0,72
  1782. - taskSuspend/taskResume pair    (+/- 8 processes active)    32,6
  1783. - lstAdd/lstDelete pair        (10 nodes in list)         3,9
  1784. - msgQNumMsgs                             1,2
  1785. - msgQReceive             (NOWAIT, no message available)    16,8
  1786. - rngBufPut/rnBufGet pair    (0x20 bytes)            24,5
  1787. - msgQSend/msgQReceive pair    (NOWAIT, no arguments)        65,7
  1788. - bcopy                (Quad aligned data)         0,515/Quad
  1789. - mutliply two floats        (depends on the value!)         1,6
  1790. - multiply two doubles        (   ''     ''    )         2,6
  1791. - Raw context switch        (8 processes active)        34,0
  1792.  
  1793. ------------------------------
  1794.  
  1795. 61. VxWorks SCSI Performance -- unofficial benchmark
  1796.  
  1797. [ From: mea@mclean.sparta.com (Mike Anderson) ]
  1798.  
  1799. System     : Heurikon HK68G/V4D  
  1800.              (33 MHz 68040, 16 MB RAM, NCR53C710 SCSI 
  1801.               w/ Hk SCSI DMA routines in Asynchronous SCSI mode)
  1802.  
  1803. VxWorks    : 5.1.1 (Yes, using Heurikon VxWorks 5.1 BSP)
  1804.  
  1805. Disk       : Seagate ST11200N (1 GB SCSI)
  1806.  
  1807. File System:  VxWorks RAW partition mounted as "/sd1/"
  1808.  
  1809. Clock Rate :  60 Hz
  1810.  
  1811. Approach: 
  1812.  
  1813.   My application has the data coming in in 16Kbyte chunks.  So, I devised
  1814. a piece of test code that would allow me to specify how many 16K chunks
  1815. I sent to the disk in each write and how many total bytes to write.
  1816. The actual number of bytes written is generally a little larger
  1817. (typically one more block size) due to the quick and dirty way I wrote
  1818. the code, but the calculations are based on the actual number of bytes
  1819. written to the disk.  The technique I used was to write a block to the
  1820. disk starting at the end of the last write and then seek back to
  1821. relative zero and write the current pointer (just as I would in real
  1822. life to know how many bytes had been streamed total).  Also, you 
  1823. may notice the disk seek time coming into effect in the 200MByte files.
  1824.  
  1825. Here are the results:
  1826.  
  1827. Buffer Size     Total Requested     Bytes/sec       total secs
  1828. 16K             1024000 (1 MB)      1,032,192       1.000   secs
  1829.                10240000 (10 MBs)    1,036,087       9.883   secs
  1830.               102400000 (100 MBs)   1,049,538      97.566   secs
  1831.               204800000 (200 MBs)   1,043,123     196.333   secs
  1832.  
  1833. 32K             1024000             1,613,193       0.650   secs
  1834.                10240000             1,627,997       6.300   secs
  1835.               102400000             1,627,980      62.900   secs
  1836.               204800000             1,610,485     127.166   secs
  1837.  
  1838. 48K             1024000             1,935,360       0.533   secs
  1839.                10240000             1,994,712       5.150   secs
  1840.               102400000             1,992,209      51.416   secs
  1841.               204800000             1,970,335     103.950   secs
  1842.  
  1843. 64K             1024000             2,169,467       0.483   secs
  1844.                10240000             2,244,905       4.583   secs
  1845.               102400000             2,246,332      45.600   secs
  1846.               204800000             2,216,450      92.400   secs
  1847.  
  1848. 96K             1024000             2,495,409       0.433   secs
  1849.                10240000             2,580,480       4.000   secs
  1850.               102400000             2,571,534      39.833   secs
  1851.               204800000             2,533,374      80.866   secs
  1852.  
  1853. 128K            1024000             2,621,440       0.400   secs
  1854.                10240000             2,761,250       3.750   secs
  1855.               102400000             2,771,147      36.983   secs
  1856.               204800000             2,726,693      75.133   secs
  1857.  
  1858. 256K            1024000             2,859,752       0.366   secs
  1859.                10240000             3,130,077       3.350   secs
  1860.               102400000             3,139,304      32.650   secs
  1861.               204800000             3,083,428      66.483   secs
  1862.  
  1863. 512K            1024000             3,145,728       0.333   secs
  1864.                10240000             3,346,519       3.133   secs
  1865.               102400000             3,361,846      30.566   secs
  1866.               204800000             3,298,416      62.150   secs
  1867.  
  1868. 1024K           1024000             3,311,292       0.316   secs
  1869.                10240000             3,475,942       3.016   secs
  1870.               102400000             3,487,345      29.466   secs
  1871.               204800000             3,416,806      60.150   secs
  1872.  
  1873. ------------------------------
  1874.  
  1875. 62. VME bus arbitration gotchas
  1876.  
  1877. [ From: mea@mclean.sparta.com (Mike Anderson) ]
  1878.  
  1879. > Sender: Rob Steele, e-mail: steele@telerobotics.jpl.nasa.gov
  1880. > I have the following VME hardware configuration:
  1881. >   VME MOTES chassis:
  1882. >      1 Motorola system controller card,
  1883. >      6 Huerikon 68020 CPU boards (HKV2A),
  1884. >      1 Micro Memory shared memory cards,
  1885. >      1 Bit-3 memory interface card,
  1886. >      2 XYCOM parallel boards, and
  1887. >      1 Excelan ethernet cards.
  1888. >      VadsWorks 2.0.1 (equivalent to vxWorks 5.0).
  1889. > I am unable to consistently boot the chassis. I will get bus errors and file
  1890. > not present errors during the boot process on different boards. On rare
  1891. > occasions it will boot. To get it to boot I halt the boot process on the last
  1892. > 4 boards in the chassis and let the first two boot. After that I boot the
  1893. > last 4 one at a time.
  1894.  
  1895. This sounds like the bus arbitration bug biting.  If the Heurikon
  1896. boards are all at the same bus grant level (they typically come from
  1897. the factory set for BG3) then you will experience "random" failures
  1898. that manifest themselves as bus errors when a board is requesting
  1899. access to the bus and the bus is so busy that the bus watchdog timer
  1900. (1.6ms on the HKV2F I think) expires.  This is proper behaviour.  The
  1901. watchdog timer is designed to alert the task that it was unsuccessful
  1902. in accessing a VME address in the alotted time and to signal that
  1903. failure with a bus error.
  1904.  
  1905. Now, there are several ways to fix this problem.  One which I heard
  1906. about was to modify the boot ROMs to insert a variable length delay so
  1907. the first CPU booted immediately, the second booted 30 secs later the
  1908. third 60 secs later, etc.  This approach was clearly a software hack
  1909. trying to get around a hardware problem that was obviously not
  1910. understood.  This approach *may* get the boards to boot, but with heavy
  1911. bus traffic during execution, they will continue to exhibit bus
  1912. errors.  You see, because the VMEbus is a daisy chain, the first CPU in
  1913. the chain has an inherently higher priority than all others that follow
  1914. it.  The 2nd board gets the next highest priority, etc.  This means
  1915. that a graph of bus access at a given BG level looks something like
  1916. this:
  1917.  
  1918.     %  60  |
  1919.            |                                              
  1920.     A  50  | * 
  1921.            |                                             
  1922.     C  40  |
  1923.            |                                                  
  1924.     C  30  |     
  1925.            |      *                                       
  1926.     E  20  |      
  1927.            |          *                                           
  1928.     S  10  |        
  1929.            |              *                                        
  1930.     S   0  |------------------*---*--                                 
  1931.               1   2   3   4   5   6                                   
  1932.               # CPUs @ BG level 
  1933.  
  1934. I.e., it is roughly an exponential decay such that, given that the
  1935. level of bus activity is moderately high, the first 1-3 CPUs will hog
  1936. 85-95% of the bus cycles and CPUs 4 and beyond will exhibit bus
  1937. errors.  If the bus activity level is very high such as during a boot
  1938. up via the backplane, you may not be able to get past CPU 2 before bus
  1939. errors manifest themselves.
  1940.  
  1941. Now, as I said, there are other ways to circumvent this problem.
  1942. Boards equipped with the VIC68 VMEbus interface, for instance, can have
  1943. their bus timeouts changed to the point of an infinite wait (i.e., the
  1944. bus watchdog is disabled).  This is still just a kludge that masks the
  1945. real problem of a poorly thought-out arbitration scheme.  With this
  1946. approach, *real* bus errors resulting from errant pointers and/or
  1947. failed boards are never reported and the system just seems to hang.
  1948.  
  1949. The REAL solution to this problem is to adjust the arbitration levels
  1950. of the CPUs.  In the VMEbus, there are 4 levels of arbitration (0-3)
  1951. where level 3 is the highest priority.  By default, virtually all
  1952. manufacturers ship their boards configured for BG3.  Therein lies the
  1953. problem.  What the real-time designer needs to do is to realize this
  1954. and make adjustments.  Within the 4 BG levels, there are two modes of
  1955. operation: 1) priority and 2) round robin.  Priority mode means that
  1956. requests at level 3 will be honored before requests at level 2.  Level
  1957. 2 before level 1 and so on.  This means that with priority mode
  1958. arbitration, put your highest priority boards at level 3 and distribute
  1959. the other boards at the other levels according to their relative
  1960. priorities.
  1961.  
  1962. On the other hand, round robin arbitration mode means that all 4 BG
  1963. levels are treated equally and each level gets a fair slice of the pie
  1964. so to speak.  Use this mode when you have lots of boards, but no one
  1965. has an inherently higher priority than any other.  With this approach,
  1966. we've been able to get as many as 16 CPUs running in the same backplane
  1967. (4 at each level) without experiencing bus error problems due to
  1968. arbitration.  Remember, just because the boards are at different BG
  1969. levels doesn't circumvent the implied priorities of the CPUs at the
  1970. *same* level based on the bus daisy chain.
  1971.  
  1972. Typically, these modes are configurable on the system controller either
  1973. through a jumper, PAL or software bit twiddling.  However, there are
  1974. boards that are hardwired for arbitration level 3 and they can't be
  1975. changed.  The Force SPARC 1E board is one of them.  This means that
  1976. you'll have to use these boards sparingly in VxWorks chassis (i.e.,
  1977. probably no more than 3-4 booting up from the backplane but probably
  1978. more if you boot each of them up from local Ethernet).  I understand
  1979. that the SPARC 2CE board uses the same VMEbus interface as the 1E which
  1980. simply means that the bus errors will happen twice as fast.  Hopefully,
  1981. the 3E board will get a real bus interface on it if it ever comes out.
  1982.  
  1983. ------------------------------
  1984.  
  1985. 63. 5.1.X new MMU supporting code gotchas, as explained in the Manual
  1986.  
  1987. Carl Lacy points out:
  1988.  
  1989.    1)  Programmer's Guide, Chapter 8.3, page 319
  1990.         How to setup the the MMU for VMEbus address spaces
  1991.  
  1992.    2)  5.1 Known Problems, Apr '93, page 5
  1993.         "Several BSPs turn on basic MMU support ... even if
  1994.         this option is not specified in configAll.h"
  1995.  
  1996. ------------------------------
  1997.  
  1998. 64. "Cannot Boot. Error 0x1a9" while downloading/booting
  1999.  
  2000. This is usually due to the built-in 'feature' inside UNIX inetd program.
  2001. The inetd tries to protect itself against clients that tries to connect
  2002. too often too quick as a security measure, and disallows more than a 
  2003. certain number of connections per given period.  When this happens, you
  2004. will usually see some error messages about "looping..." in syslog (if
  2005. your syslog is configured correctly) on your UNIX server (where inetd
  2006. is running).  You can either try "kill -HUP inetd_process_id" to get
  2007. out of this looping mode by sending HUP signal to inetd, or try and
  2008. install the patched version of inetd that has larger default limit for
  2009. looping detection (some OS vendors will supply this to you), or just
  2010. get a copy of BSD UNIX distribution of inetd source code and compile it
  2011. with larger default values for looping and use it instead.
  2012.  
  2013. ------------------------------
  2014.  
  2015. 65. problem with qsort in some versions of VxWorks
  2016.  
  2017. Some version of VxWorks are shipped with incorrect qsort(), to remedy
  2018. this problem, get a copy of qsort() from BSD UNIX distribution and 
  2019. compile it.
  2020.  
  2021. ------------------------------
  2022.  
  2023. 66. fmod fiasco
  2024.  
  2025. From: jbrandt@sadira.gb.nrao.edu (JOE BRANDT)
  2026.  
  2027. remainder = fmod(value, divisor) - floating point modulus routine.
  2028.  
  2029. The fmod math subroutine for MC68040 (mv167) based systems has been a
  2030. topic of discussion on the exploder for many months now. The first
  2031. discussions centered around the routine's accuracy (or even
  2032. correctness). Recently I found that the execution time for the fmod
  2033. subroutine is highly dependent upon the ratio of the values passed as
  2034. arguments. At a ratio of about 50,000 I was seeing execution times of
  2035. 30ms!  The VxWorks exploder FAQ now includes a proposed replacement
  2036. routine for 68040 systems, however, I have examined this routine and
  2037. found it to be grossly in error in cases where the divisor is less than
  2038. 1.0.
  2039.  
  2040. Fortunately, I have found public domain source, authored by Sun Micro, 
  2041. for an alternative algorithm. This algorithm claims an exact result. 
  2042. It can be found at:
  2043.     ftp: plan9.att.com in /netlib/fdlibm/e_fmod.c.Z 
  2044.     (I believe ftp.uu.net has copies also).
  2045. This appears to be a ieee 754 compliant routine. (I'm not sure what that
  2046. means, but it sounds good).
  2047.  
  2048. Execution times for this routine are in the range of 7.6 to 100 usec's.
  2049.  
  2050.  
  2051. From: vince@rti.com (Vince Chen)
  2052.  
  2053. > Submitted-by jbrandt@sadira.gb.nrao.edu  Thu Mar 24 12:41:16 1994
  2054. > Submitted-by: jbrandt@sadira.gb.nrao.edu (JOE BRANDT)
  2055. > While I currently am not questioning the accuracy of the fmod() function,
  2056. > the performance of it on the mv167 card (68040) is certainly an issue.
  2057. > Here's some benchmarks from my 5.1/mv167 system:
  2058. > -> timexN(fmod, 49999.9, 1.0)
  2059. > timex: 25 reps, time per rep = 30661 +/- 666 (2%) microsecs
  2060. > -> timexN(fmod, 2.0, 1.0)
  2061. > timex: 50000 reps, time per rep = 9 +/- 0 (0%) microsecs
  2062. > -> timexN(fmod, 499.9, 1.0)
  2063. > timex: 2525 reps, time per rep = 305 +/- 6 (1%) microsecs
  2064. > Note the dependency on value. Unfortunately I am doing an fmod on the
  2065. > modified julian date (which is currently in the 50,000 range). which
  2066. > took an amazing 30ms/call !
  2067. > Wow, can some elaborate on the algorithm being used here. seems like it's
  2068. > a straight while loop!
  2069.  
  2070. I believe it is a while loop.  A while loop is faster in some situations,
  2071. but obviously no in yours!
  2072.  
  2073. Until WindRiver resolves the problem w/ the Motorola Floating Point 
  2074. Exception library, you may want to roll your own on this one.
  2075. The code below on our 167/25MHz VxWorks 5.1 consistently results in 30 usecs.
  2076.  
  2077. double myfmod1( double arg1, double arg2 )
  2078. {
  2079.     return (arg1 - ((int) (arg1 / arg2)) * arg2);
  2080. }
  2081.  
  2082. ------------------------------
  2083.  
  2084. 67. MVME167 copyback cache and various problems
  2085.  
  2086. From: georg@sgl.ists.ca (Georg Feil)
  2087.  
  2088. Well, I think we now know everything there is to know about the memPartFree()
  2089. problem we were having. The original subject here was "memPartFree error with
  2090. copyback caching enabled (167)". Other past subjects that possibly related to
  2091. the same problem include "Large disk writes w/cache cause MVME167 to freeze".
  2092. Apparently the root cause is a snooping problem related to TAS on the
  2093. VME bus, and is Motorola's fault.
  2094.  
  2095. The solution to the problem is the "MV167 VME TAS patch" from Wind River. 
  2096. It consists of a number of configuration changes (config.h, usrConfig.c etc.)
  2097. and is reproduced below. Strangely, it has not been assigned an SPR number
  2098. because, according to Wind River, the new version of the 167 BSP has fixed
  2099. the problem so no SPR is necessary(?). This situation may have changed since
  2100. the memos I received were written. Our related TSR number was 16443, which may
  2101. help others to track things down.
  2102.  
  2103. I had already come up with my own patch that worked in a completely different
  2104. (and very specific) way, and the WRS patch seemed not to apply to our problem.
  2105. However I tested the patch anyway and sure enough it fixes our problem.
  2106. As a bonus, SCSI performance seems to have improved slightly.
  2107.  
  2108. ------------------------------
  2109.  
  2110. 68. unloading objects
  2111.  
  2112. From: stan@rti.com (Stan Schneider)
  2113.  
  2114. Under VxWorks 5.1.x, you can use 'unld "file.o"' (or use the module id,
  2115. see "moduleShow").  Under 5.0.x, you can't unload the object & reclaim the
  2116. space, but you could remove the symbols from the symbol table with symRemove.
  2117. That would prevent unnecessary maiming.
  2118. ------------------------------
  2119.  
  2120. 69. HDLC driver software 
  2121.  
  2122. I have drivers/libraries and application software for the Siemens 82532
  2123. multiprotocal chip (SYNC/ASYNC serial communication HDLC/SDLC protocol).
  2124. Maybe there is some compatibility. This is running well in our inhouse
  2125. designed VME module running vxWorks for the mc68332.
  2126.  
  2127.  Graham Waters                          waters@reg.triumf.ca
  2128.  TRIUMF                                 Control Systems Engineer.
  2129.  Meson Research Facility,
  2130.  4004 Wesbrook Mall,
  2131.  Vancouver, B.C. Canada.
  2132.  V6T 2A3
  2133.  
  2134. ------------------------------
  2135.  
  2136. 70. SO_KEEPALIVE
  2137.  
  2138. There are two types of keep alive packets.  I don't know how smart snoop
  2139. program is, but most analyzers i've seen do not flag a keepalive packet
  2140. seperately.  KEEPALIVE is not really a part of original TCP spec anyway, so
  2141. this is understandable.  it was an add-on hack by BSD implementation.
  2142.  
  2143. KEEPALIVE packet was implemented in two different ways.  The 4.2 BSD
  2144. implemented it wrong, and expected a zero length packet.  It send out a
  2145. packet with sequence number set to snd_una -1 (send unack'ed - 1) and ack
  2146. set to rcv_next - 1.  This forces a response from a well behaved TCP peer
  2147. either in the form of a ACK or RST depending on the peer's status.
  2148.  
  2149. The 4.3 BSD implemented it better, and send a packet with the sequence
  2150. number set to snd_una -1 and ack set to rcv_next.  the same behavior was
  2151. expected from a TCP peer.
  2152.  
  2153. The keep alive will start after connection has been idle for 75 seconds, and
  2154. keepalive probe will continue for ~2 hours.  This is in adherence to the
  2155. spirit of TCP -- you're not supposed to randomly drop connections.  the
  2156. keepalive is, in a way, a necessary evil, that provides realistically slow
  2157. garbage collection of zombie connections.  It was not meant to be used to
  2158. detect the other side dying away in realtime.  It can be a headache, for
  2159. example, over a very high latency link, when you're doing a telnet, if
  2160. keepalive randomly or too quickly decided to terminate the connection
  2161. because it timed out too quick.  You might think 2 hours is excessive, but
  2162. in the old days, this was a real problem -- like when you are telneting to a
  2163. host in spain over various low quality, high latency, noisy links...  type a
  2164. character and wait for 10 mintues... that was common.
  2165.  
  2166. The only application controllable, expectedly behaving way to detect the
  2167. other side going away is to use a seperate connection, or a seperate
  2168. connection-less channel.... for out of band status info delivery.  a kind of
  2169. i'm alive or are you there...  many TCP and UDP based standard protocols do
  2170. a form of this... FTP, RSH, etc.
  2171.  
  2172. SO_RCVTIMEO and SO_SNDTIMEO are not used in reality.  they are set and
  2173. recorded but never reference for any useful work.
  2174.  
  2175. Adjusting keepalive packet intervals is only possible using global
  2176. variables.  This will affect all TCP sessions on the machine that has
  2177. keepalive mode set.
  2178.  
  2179. You can play games with the following variables:
  2180.     tcp_keepidle, tcp_keepintvl, tcp_maxidle.
  2181.  
  2182. Please get a copy of BSD UNIX TCP/IP code from FTP sites and look into
  2183. tcp_timer.c and other TCP files before you go and change things though.  The
  2184. keepalive is actually also used in connection setup phase (as a hack).
  2185. Changing these values carelessly will result in wierd TCP behavior on all
  2186. TCP sockets.
  2187.  
  2188. ------------------------------
  2189.  
  2190. 9999: Contributions to comp.os.vxworks FAQs.
  2191.  
  2192. The following net.folks, among others, have contributed to this posting:
  2193. [ If you have contributed, but are not listed here please me know. ]
  2194.  
  2195.  Name            email address
  2196.  ------------        ----------------------------    
  2197.  Mike Anderson        mea@mclean.sparta.com
  2198.  Mark Linimon         linimon@nominil.lonestar.org
  2199.  Geoff Espin        geoff@wrs.com
  2200.  Rev. Bob Crispen    crispen@foxy.boeing.com
  2201.  Stan Schneider        stan@rti.com
  2202.  Fred J Roeber        fjr@ssd.ray.com
  2203.  Marc Friedman        maf@verdix.com
  2204.  Joe Van Andel        vanandel@ncar.ucar.edu
  2205.  Emily Hipp        hipp@wrs.com
  2206.  Bob Marino        ram@mr.picker.com
  2207.  Richard Kowalsky    cmdorat@tc.fluke.com 
  2208.  Kent Long        kent@wrs.com
  2209.  James Moore        james@wrs.com
  2210.  Chuck Meade        chuckm@verdix.com
  2211.  Patrick T. Pinkowski    ppinkow@jupiter.ksc.nasa.gov
  2212.  D'Anne Thompson    dat@noao.edu
  2213.  Leonid Rosenboim    leonid@rst.hellnet.org
  2214.  David Lim        lim@robotics.jpl.nasa.gov
  2215.  Richard Neitzel    thor@thor.atd.ucar.edu
  2216.  John Winas        winas@phebos.aps.anl.gov
  2217.  Lawrence T. Hoff    hoff@bnlux1.bnl.gov 
  2218.  Georg Feil        georg@sgl.ists.ca
  2219.  Steve Morris        morriss@smtplink.indigo.co.il
  2220.  Don Brooks        dab@netcom.com
  2221.  Ton Janssen        djanssen@mswe.dnet.ms.philips.nl
  2222.  Brian Brunner        brunner%mother@icarus.ssd.loral.com
  2223.  Carl Lacy        lacy@draper.com
  2224.  Joe Brandt        jbrandt@sadira.gb.nrao.edu
  2225.  Vince Chen        vince@rti.com
  2226.  Graham Waters        waters@reg.triumf.ca
  2227.  
  2228. I welcome reactions, additions, and corrections to this posting via email:
  2229.  
  2230.  Hwa-Jin Bae
  2231.  PEACEFUL STAR
  2232.  hjb@netcom.com 
  2233.  
  2234. ------------------------------
  2235.  
  2236. ===============================================================================
  2237. -- 
  2238. hwajin
  2239. PEACEFUL STAR
  2240.