Re: Question about threads?

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

From: Gary G. Little (gglittle.nospam_at_sbcglobal.net)
Date: 01/06/05


Date: Thu, 06 Jan 2005 18:25:30 GMT

IRQL DISPATCH and above, including DIRQL or the interrupt level of your
driver are in arbitrary thread context, and can normally access kernel
globals, unless they are in paged memory, depending on how the developer
decided to define the globals.

You can access your global from your interrupt if it is not in paged memory,
but you have allocate as such. Look for such macros as LOCKXXX and PAGEXXX
in the examples. Unless specified however, globals and functions, default to
non-paged memory.

-- 
The personal opinion of
Gary G. Little
<o> wrote in message news:efm1rk48EHA.1400@TK2MSFTNGP11.phx.gbl...
> If I have a global int in my driver, this is non-arbitrary
> context, is that correct? Now, if I have an interrupt
> routine in my driver, this will be arbitraty context, is
> that correct?, can I access my global int in the interrupt
> routine?


Relevant Pages

  • Re: 2.6.16-mm1
    ... then prints that out in the lost-ticks handler. ... Because the overdue timer interrupt will trigger one instruction later. ... But you're right they should at least be using per cpu variables ... instead of globals which can be corrupted by other CPUs. ...
    (Linux-Kernel)
  • Re: [patch 3/3] genirq: introduce =?UTF-8?Q?IRQF=5FALLOW=5FNESTED=20flag?= =?UTF-8?Q?=20for=
    ... or in hard irq context. ... and nested interrupts for the client interrupt. ... Drivers requesting an IRQ must now know whether the handler will ... The problem is that the requesting driver sometimes doesn't know ...
    (Linux-Kernel)
  • Re: HW registers shared by OAL and user-mode device driver
    ... 'process context' and some will run in 'interrupt context'. ... I guess OEMIdle or OEMInterruptHandler will run in 'interrupt ... Did Microsoft document which OAL functions run in 'interrupt context'? ... serialized within the driver). ...
    (microsoft.public.windowsce.platbuilder)
  • Re: [patch 3/3] genirq: introduce IRQF_ALLOW_NESTED flag for request_irq()
    ... and nested interrupts for the client interrupt. ... The problem is that the requesting driver sometimes doesn't know about the ... framework that the handler will happily run either in hardirq or nested ... context, without any ill effect. ...
    (Linux-Kernel)
  • Re: scope of static?
    ... when one declares some public method or variable ... A static exists within the scope of a class loader. ... instance field is global within the context of an instance". ... I have seen "globals" that exist within the context of a JVM; ...
    (comp.lang.java.help)