Re: OS Question
- From: Hugo gleaves@xxxxxxxxxxx> <hugh<underbar>
- Date: Tue, 13 May 2008 00:21:00 -0700
"Maxim S. Shatskih" wrote:
Hi MaximCan you explain? what is not compatible with multithreading? If there is
- 2 threads wants to write access the same data
- first gain the access
- second thread gains the access
- first thread does its work and returns
- on return, the data is marked back as read-only
- then second thread try to do work, and the data is read-only, a crash
--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@xxxxxxxxxxxxxxxx
http://www.storagecraft.com
The scenario you outline is correct, but the code isnt designed that way,
you have outlined an issue that a designer must address, but this is not an
incompatibility.
In reality the first thread doesnt reset page access to ReadOnly, the reset
only takes place if the returning thread is the last thread (this is tracked
in a count managed by a critical section).
All of this actually works, and was tested some time back (but the feature
has been dormant and unused for some time, but will be an officially
supported option for users of the API).
Thanks for outlining the issue though, it is a real issue and would be a
design need.
HUgh
.
- References:
- OS Question
- From: Hugo gleaves
- Re: OS Question
- From: Alexander Grigoriev
- Re: OS Question
- From: Hugo gleaves
- Re: OS Question
- From: Maxim S. Shatskih
- Re: OS Question
- From: Hugo gleaves
- Re: OS Question
- From: Maxim S. Shatskih
- OS Question
- Prev by Date: Re: How to set NIC to promiscuous mode from FilterHook driver
- Next by Date: Re: OS Question
- Previous by thread: Re: OS Question
- Next by thread: WDM USB driver trouble under vista
- Index(es):
Relevant Pages
|