Tuesday, September 17, 2013

Semaphore Trouble

So now the first three new drivers have been written.  I have some spare hardware on order - another temperature module, like the one I'm already using - for testing the new DR2 driver.
DR1 and DR3 run great...separately.  Start them both at the same time, and odd things happen.  It looks like the semaphore system is the only connecting item between the two.  This is because they both share the same, built-in serial port.  The semaphore system is meant to keep them from trying to use the port at the same time.  Right now, it does not appear to be doing what it should be.  I went through both DR1 and DR3 with a fine toothed comb, and while I found a couple of goofs, fixing them did not cure the problems.  Oh, well; this is what makes it fun, that is, solving difficult problems.
P.S. So why didn't he just use the built-in semaphores supplied in Linux?  They seem too complex to implement for this application.

More later.