Re: SYNC beteen kernel and driver

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



The most obvious answer is to change the app to call the driver instead of
the OAL. Don't put the functionality in the OAL unless the *OAL* needs
access.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Jocky.Guo" <JockyGuo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:6119774F-4E4E-4817-A11A-BCCB10C70F17@xxxxxxxxxxxxxxxx
Thanks~
Actually, my problem is Application will call KernelIoControl to do some
operation with NAND FLASH(And AP can do this at anytime). So, this will
conflict with my NAND driver. I just put all the important operation in
one
function in NAND driver and OAL.lib will link my NAND driver. As you've
said
that this doesn't work. Please advise one.

"Dean Ramsier" wrote:

If I understand you properly, no. Critical section objects have to be
globally visible in the areas they are protecting. You can't have a
driver
and the OAL both linking to a library that is depending on critical
sections
in the library to provide synchronization. You'll end up with separate
critical sections in the driver and the OAL, and they won't protect
against
each other.

--
Dean Ramsier - eMVP
BSQUARE Corporation


"Jocky.Guo" <JockyGuo@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:AD5BD9FF-0D69-46D0-9462-D5A607ACF4A8@xxxxxxxxxxxxxxxx
As i known that API calling in OAL are not allowed. Now my problem is
OAL
need to sync with my driver. So my idea is to put all the HW register
operation in one function(in driver), and use CriticalSection to
protect.
OAL
will link my driver's Lib and call this function. can anybody tell me
whether
this method works. if not please advise some. thanks a lot !





.



Relevant Pages