[pso] [Tema 2] [Windows] KeSetEvent

Marius Nicolae mariusn007 at gmail.com
Tue Apr 29 09:54:46 EEST 2008


Salut,

In primul rand,  La multi ani la toata lista!

2008/4/25 Razvan Deaconescu <razvand at cs.pub.ro>:
> On Fri, 2008-04-25 at 16:13 +0300, Marius Nicolae wrote:
>  > 2008/4/25 Razvan Deaconescu <razvand at cs.pub.ro>:
>  > > On Thu, 2008-04-24 at 22:11 +0300, Andrei Ciuca wrote:
>  > >  > Salut,
>  > >  >
>  > >  > Se poate apela "KeSetEvent" din handlerul intreruperii ?
>  > >
>  > >  Din documentatia KeSetEvent[1]: the caller can be running at IRQL <=
>  > >  DISPATCH_LEVEL.
>  > >
>  > >  Mai multe informatii despre IRQL puteti afla aici[2].
>  > >
>  > >  Concluzia este ca nu puteti folosi KeSetEvent dintr-un handler de
>  > >  intrerupere. Va trebui sa planificati un DPC pentru acest lucru.
>  >
>  > Si daca punem FALSE pentru campul de wait, putem sa folosim KeSetEvent
>  > din handlerul de intrerupere?
>  >
>  > "If Wait is set to FALSE, the caller can be running at IRQL <=
>  > DISPATCH_LEVEL. Otherwise, callers of KeSetEvent must be running at
>  > IRQL = PASSIVE_LEVEL and in a nonarbitrary thread context."
>
>  "the caller can be running at IRQL <= DISPATCH LEVEL"

Deci cu alte cuvinte prin "the caller can be running at IRQL <=
DISPATCH LEVEL" vroiau sa spuna "the caller cannot be running at IRQL
> DISPATCH LEVEL". Cam nefericita formularea (adica, daca tu poti
manca mai putin de doua oua rosii (banuiesc ca poti) nu inseamna ca nu
poti manca mai mult de doua oua rosii... :D)

Oricum, din moment ce KeSetEvent nu se blocheaza, nu inteleg de unde
restrictia de mai sus, dar banuiesc ca exista un motiv bine intemeiat
(?).

Multumesc pentru raspuns!

Numai bine,
Marius NICOLAE

>
>  IRQL == PASIVE == 0       -> context proces
>  IRQL == APC == 1          -> asynchronous procedure call
>  IRQL == DISPATCH == 2     -> DPC (deferred procedure call)
>
>  IRQL <= DISPATCH_LEVEL inseamna IRQL <= 2
>
>  O rutina de tratare a unei intreruperi hardware ruleaza la IRQL > 2.
>
>  Ai parcurs al doilea link[1] trimis de mine in mesajul anterior? O
>  propozitie din acel articol spune:
>  --
>  The IRQL values are divided into two groups: Software ( 0,1,2 ) /
>  Hardware IRQL ( >= 3)
>  --
>
>  Razvan
>
>  [1] http://ext2fsd.sourceforge.net/documents/irql.htm
>
>
>
>
>  --
>  This message has been scanned for viruses and
>  dangerous content by MailScanner, and is
>  believed to be clean.
>
>  _______________________________________________
>  pso mailing list
>  pso at cursuri.cs.pub.ro
>  http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/pso
>


More information about the pso mailing list