[Info-vax] Volatile, was: Re: yet another sys$qiow question

JF Mezei jfmezei.spamnot at vaxination.ca
Thu Aug 20 17:43:39 EDT 2015


Question for Mr VAXman:

Since you live/eat/sleep/dream in kernel mode, do you still have to
worry about something modifying a variable's value outside of your code ?


Obviously, while in kernel mode, you can't be interrupted by an IO that
completes, right ? Or could an IO completing on another processor modify
memory areas that your kernel code is playing with ?

But what about multiprocessor systems, can user mode code in one thread
modify a variable that is being used by your kernel code running on
another processor ?


And pardon my ignorance here, but when you issue a request to an IO
device (aka: your code is the driver), I take it your code ends/returns
once request is made, and then a totally new instance of your code
begins when the driver sets a byte somewhere and the OS realises the IO
device wants the driver to process something ?

aka: you don't wait for some value to change, you just return, knowing
the OS will call you again when the value changes ?







More information about the Info-vax mailing list