From: Don Burn on 1 Jul 2010 13:31 You cannot get this to work, in fact you are lucky with current in kernel setup, enough interrupts and DPC stuff can occur to cause you a problem. I'd suggest leaving this in the kernel, if you need floating point set up your own worker thread with floating point. Then use an interlocked list to insert requests into a queue that the thread processes. Don Burn (MVP, Windows DKD) Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr > -----Original Message----- > From: Giuseppe [mailto:electrostudio(a)hi-net.it] > Posted At: Thursday, July 01, 2010 1:09 PM > Posted To: microsoft.public.win32.programmer.kernel > Conversation: Execute user code from kernel > Subject: Re: Execute user code from kernel > > I have to acquire an analog signal through A/D converter board, to perform the > operations and write the value in the D/A Converter board. > This should be done approximately every millisecond. > Currently the function is written in the kernel and works correctly even if > windows is loaded to 100%. > > To increase flexibility and use floating point operations, I would transport > the user-level function. > I did not want to use real-time operating systems due to their complexity and > also can not integrate standard Windows applications. > > Thanks. > > > > "Krzysztof Uchronski" <krzysztof.uchronski(a)biglasagne.com> ha scritto nel > messaggio news:CC91B35C87244FF2BAD1B9EC691E894B(a)NewnhamResearch.local... > > This is bad idea. By doing that you are not only creating potential > > security hole (imagine that your UM code you want to run from kernel > > has been replaced with something else) but also destabilize the whole > > system (again your UM code may be trashed and system crash is almost > > guaranteed). On top of it there is of course a problem of context > > DpcForIsr is running in (it's arbitrary), basically its code runs in > > the context of whatever process happened to be an active one (and no > > you can't switch contexts when you are at DISPATCH_LEVEL) - so you are > > usually not in the right UM address space hence you can't safely > > access your UM code. > > > > Anyway, I would suggest to use inverted calls technique (there's nice > > article from OSR guys) where one can "notify" UM mode component (from > > KM) to do some work. > > > > And the major question here is: what are you actually trying to do? > > > > Kris > > > > -----Original Message----- > > From: Giuseppe [mailto:electrostudio(a)hi-net.it] Posted At: Thursday, > > July 01, 2010 10:46 AM Posted To: > > microsoft.public.win32.programmer.kernel > > Conversation: Execute user code from kernel > > Subject: Execute user code from kernel > > > > To make more accurate the system should call a function from kernel --> > > DpcForIsr (IRQL = DISPATCH_LEVEL) to user-level function. > > > > If you can, what limitations are there? > > > > Thanks > > > > > > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > > signature database 5242 (20100701) __________ > > > > The message was checked by ESET NOD32 Antivirus. > > > > http://www.eset.com > > > > > > > > > > __________ Information from ESET NOD32 Antivirus, version of virus > > signature database 5243 (20100701) __________ > > > > The message was checked by ESET NOD32 Antivirus. > > > > http://www.eset.com > > > > > > > > __________ Information from ESET NOD32 Antivirus, version of virus signature > database 5243 (20100701) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > > __________ Information from ESET Smart Security, version of virus signature > database 5244 (20100701) __________ > > The message was checked by ESET Smart Security. > > http://www.eset.com >
First
|
Prev
|
Pages: 1 2 Prev: CLICK AND GET $1000 TO YOUR HOME. Next: MmMapLockedPagesSpecifyCache in XP and Server2003 |