> I see your suggestion, but the change in design is not possible at this
point.
There are certain features which are available only accessible on the
kernel mode. There is also an algorithm that involves lot of floating
point arithmetic directly interacting with the FPU.
Its a simple driver invoking an algorithm with the data from the serial
port. I want to know how to to achieve this kind of communication between
two drivers.
I’d have to second Mark’s view on WHY is this even a driver. Serial ports
deliver typically a maximum of about 10 kilobytes/sec. A reason you might
want something doing I/O as a driver would be to avoid significant overhead
of mapping received data into a user process, but the data rates from a
serial port are trivial.
You said “it’s already designed as a driver”, yet my guess is changing the
design to a normal user mode process and getting it all working will be
easier/faster than getting a driver fully debugged. As your just starting
our writing drivers, this is doubly so. Future support will also be much
easier if it’s just a user mode app.
You’re aware that to debug a driver requires two machines connected via 1394
or a serial port? User mode debugging all can happen on one machine, or
remotely over a network.
You say your app does a lot of floating point calculations, which is yet
another reason to make it a user mode app. Using floating point in a kernel
driver can be intricate.
If you MUST make it a driver, perhaps you should the UMDF (user mode driver
framework), which is designed EXACTLY for cases where you need some kernel
mode facilities, yet you don’t need the performance benefits when you’re
moving lots of data.
Lots of us here have very significant experience in both user mode and
kernel work. If you explained WHY you think you need to write a driver we
could confirm that yes a driver would be needed or no a user mode process is
a much better fit.
If you’re just doing this for something like a class project, then yes we
could understand why you might want to a write a driver when it’s not
needed.
You’re also aware that you generally can’t just take random user mode C/C++
source code and compile it up inside a driver. The execution environment is
NOT a standard C/C++ application environment. Many of the standard C
run-time support functions simply will not function in a driver. If you need
to interact with a user for any reason, you may need to write a user mode
app anyway.
Jan