Interlocked func in between a Spinlock?!

Discussion in 'Windows Vista Drivers' started by greg1x, Oct 9, 2006.

  1. greg1x

    greg1x Guest


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

    greg1x, Oct 9, 2006
    1. Advertisements

  2. greg1x

    Vetzak Guest

    Vetzak, Oct 9, 2006
    1. Advertisements

  3. greg1x

    Don Burn Guest

    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
    Don Burn, Oct 9, 2006
  4. greg1x

    greg1x Guest

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

    greg1x, Oct 9, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.