When examining mouclass code, I noticed following:
// #define WAITWAKE_ON(port) ((port)->WaitWakeIrp != 0)
#define WAITWAKE_ON(port) \
(InterlockedCompareExchangePointer(&(port)->WaitWakeIrp, NULL, NULL)
!= NULL)
I wonder why this change was made; I was under impression reading properly
aligned pointer value is safe with respect to interlocked operations. Is it
false assumption or is it different in 64-bit world?
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
I was being overly aggressive, a normal read would have been fine.
d
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Michal Vodicka
Sent: Friday, February 13, 2004 12:48 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] Reading DWORD values
When examining mouclass code, I noticed following:
// #define WAITWAKE_ON(port) ((port)->WaitWakeIrp != 0)
#define WAITWAKE_ON(port) \
(InterlockedCompareExchangePointer(&(port)->WaitWakeIrp, NULL,
NULL)
!= NULL)
I wonder why this change was made; I was under impression reading
properly
aligned pointer value is safe with respect to interlocked operations. Is
it
false assumption or is it different in 64-bit world?
Best regards,
Michal Vodicka
STMicroelectronics Design and Application s.r.o.
[michal.vodicka@st.com, http:://www.st.com]
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com
To unsubscribe send a blank email to xxxxx@lists.osr.com