[geeks] Win32 Threads

Joshua D Boyd jdboyd at cs.millersville.edu
Tue Dec 10 21:59:51 CST 2002


On Tue, Dec 10, 2002 at 09:48:47PM -0600, Jonathan C. Patschke wrote:
> On Tue, 10 Dec 2002, Joshua D Boyd wrote:
> 
> > I don't think there are races or the similar, since the threads
> > shouldn't be trying to write to any of the same places.
> 
> Perhaps you're writing to an index of some sort, and then relying on it
> not changing (ie: using it in a loop) in the other thread?

That I can certainly not doing.  The sub thread is only writing a
pointer to a brand new Matrix4 (my 4x4 matrix math class in the
project, which contains only a pointer to a float[16]), a Pt3 (my point
in space class, which contains only four floats), and two other floats.

It is also calling a DLL, which the main thread never calls, except for
once immediately before the thread is started.  So, the subthread is
just a while(1) loop calling the DLL for hardware IO, and writing the
results back for the main program to use, after some minor processing.
It produces a great leap in application performance, especially on dual
proc machines, since the IO calls are syncronous.

This stupid piece of hardware is insane.  But it is the only thing like
it on the market (and reportedly only 10 have been manufactored so far),
and the stupid maker has the thing tightly wrapped up in patents, and is
very litigious.  Though I fail to see what could be patentable about
this thing.  

Plus, this hardware maker only supports windows.  So, in short, the
option is to either break down and use windows, or not do the project at
all.  And I think that even Dave might appreciate this project.  The
idea is that instead of Doctors learning to laproscopic surgery on live
human patients like they currently do, they learn to do it on a
forcefeed back computer trainer.

Dave, do you really want Doctors doing surgery on you without other
training?  Because until this is finished, someone has to be first.  And
to do it without Windows would require waiting for the patents to expire.

-- 
Joshua D. Boyd



More information about the geeks mailing list