Hi!

Is there any reason to use interlocked functions in between a spinlock?

Thanks,
greg1x

Re: Interlocked func in between a Spinlock?! by Vetzak

Vetzak
Mon Oct 09 03:52:18 CDT 2006


greg1x wrote:
> Hi!
>
> Is there any reason to use interlocked functions in between a spinlock?
>
> Thanks,
> greg1x

No.


Re: Interlocked func in between a Spinlock?! by Don

Don
Mon Oct 09 06:55:53 CDT 2006

If all accesses to the variable being accessed by the interlocked function
are protected by the same spinlock, there is no need. If not everything is
protected by the lock, you need to determine if adding the lock or using
interlocked makes more sense. If adding the lock is hard due to lock
heirarchies and IRQL then keep the interlocked function, just use it
everywhere.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
http://www.windrvr.com
Remove StopSpam from the email to reply





"greg1x" <greg1x@yahoo.com> wrote in message
news:806e5$4529f177$50637264$25627@news.chello.hu...
> Hi!
>
> Is there any reason to use interlocked functions in between a spinlock?
>
> Thanks,
> greg1x
>
>



Re: Interlocked func in between a Spinlock?! by greg1x

greg1x
Mon Oct 09 07:03:55 CDT 2006

Thanks Vetzak and Don.
I don't need it then. ;)

Regards,
greg1x