From siewerts@rodin.Colorado.EDU Mon Sep 29 22:55 MDT 1997 Received: (from siewerts@localhost) by rodin.Colorado.EDU (8.8.7/8.8.7/UnixOps/Hesiod/(SDM)) id WAA00318; Mon, 29 Sep 1997 22:54:01 -0600 (MDT) From: Sam Siewert Message-Id: <199709300454.WAA00318@rodin.Colorado.EDU> Subject: A good question ... To: Bruce.Gilland@colorado.edu (Bruce Gilland), luckey@ucsu.colorado.edu (Dave Luckey), hermanc@ucsu.colorado.edu (Chris Herman), willisj@colorado.edu (Jason Willis), shepperd@rodin.Colorado.EDU (Ryan Shepperd), sturmc@nag.cs.Colorado.EDU (Chris Sturm), ebers@ucsub.colorado.edu (Bradon Ebers), bryanth@cs.colorado.edu (Heather Bryant), hartmann@spot.colorado.edu (Jason Hartmann), molgaard@rintintin.colorado.edu (Jason Molgaard), millarda@rintintin.colorado.edu (Andrew Millard), riddle@rodin.Colorado.EDU (Ellen Riddle), ehansen@rodin.Colorado.EDU (Elaine Hansen), faberj@rodin.Colorado.EDU (Jack Faber), siewerts@rodin.Colorado.EDU (Sam Siewert), height@rodin.Colorado.EDU (Tom Height), antell@rodin.Colorado.EDU (Joe Antell), looneyk@rodin.Colorado.EDU (Looney Karen), wilklow@rintintin.colorado.edu (Colette Wilklow), muckentj@ucsub.colorado.edu (Jason Muckenlteiler), vandermi@rintintin.colorado.edu (Bill Vanderminden), grusin@rodin.Colorado.EDU (Mike Grusin), dnnelson@ball.com (David Nelson), grahamca@nag.cs.Colorado.EDU (Colin Graham), rhenders@ball.com (Roger Henderson) Date: Mon, 29 Sep 1997 22:54:01 -0600 (MDT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Content-Length: 1616 Status: RO Hi, A couple of people working dilligently on HW #2 asked me a very good question ... How can 2 different tasks access the same serial interface? Notice that TLM is only writing and that CMD is only reading, so there is no conflict since the serial device has a receive ring buffer and a send ring buffer. The standard tyCo driver and loose and fast world of VxWorks will let 2 different tasks read and write the same driver through a common data segment descriptor. In general, this is not the best coding practice, but it's ok if commented based on the above rationale about the 2 ring buffers. Often in embedded systems, one will relax coding practices common in Unix in the interest of efficiency. To make it better, it would be good to do 2 opens, the first as read-only and the second as write-only, and have the driver check this!!!! I don't think the tyCo driver cares, but it probably should. I put an example in /tools2/wind/asen4519 called tyco_rw_test.c. Give it a try. You should have everything you need to piece this code together. I will provide a command test interface for you later this week. Homework #1 is graded and will be handed back tomorrow. Enjoy. --Sam ________________________________________________________________________ Sam Siewert -- Software/Aerospace Engineer Colorado Space Grant Consortium -- University of Colorado Boulder e-mail: siewerts@rodin.colorado.edu WWW home page: http://www-sgc.colorado.edu/people/siewerts/me.html voice: (303) 492-1243 fax: (303) 492-5456 ________________________________________________________________________