RES: Synchronization for UNICODE_STRING lists

Both the mechanisms are MP safe, ether MUTEX or SPIN_LOCK. The
relevant difference between them is performance and IRQL. MUTEX can be
used only for synchronization of resource between threads that run in
PASSIVE_LEVEL, but if the resource will be accessed by threads in higher
level, then is needed use SPIN_LOCK.

For details:
http://www.osronline.com/article.cfm?id=93

Thanks for all,
Fernando Roberto da Silva.

-----Mensagem original-----
De: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] Em nome de Fernando Roberto
Enviada em: quinta-feira, 1 de setembro de 2005 15:05
Para: Windows System Software Devs Interest List
Assunto: [ntdev] Synchronization for UNICODE_STRING lists

Hi all,

I have a list of UNICODE_STRINGs and I’m using
RtlXxxUnicodeString to perform operations with elements from it.
However, I need to synchronize that list and I can’t use a SPIN_LOCKs
because my threads will be running at DISPATCH_LEVEL when it is acquired
and thus can’t call RtlXxxUnicodeString routines because callers from
them must be in PASSIVE_LEVEL.
Well, I’m thinking use MUTEX objects to synchronize my list, but
what risk I have related to SMP subjects?

Thanks in advance,
Fernando Roberto da Silva.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument:
‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

I would redesign the code to avoid using RtlXxxUnicodeString on
DISPATCH_LEVEL.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com

----- Original Message -----
From: “Fernando Roberto”
To: “Windows System Software Devs Interest List”
Sent: Thursday, September 01, 2005 10:04 PM
Subject: [ntdev] Synchronization for UNICODE_STRING lists

Hi all,

I have a list of UNICODE_STRINGs and I’m using
RtlXxxUnicodeString to perform operations with elements from it.
However, I need to synchronize that list and I can’t use a SPIN_LOCKs
because my threads will be running at DISPATCH_LEVEL when it is acquired
and thus can’t call RtlXxxUnicodeString routines because callers from
them must be in PASSIVE_LEVEL.
Well, I’m thinking use MUTEX objects to synchronize my list, but
what risk I have related to SMP subjects?

Thanks in advance,
Fernando Roberto da Silva.


Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256

You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com

Mutexes are SMP safe. Only one thread can own a mutex object no matter
which processor it is running on.

On Thu, 01 Sep 2005 11:04:40 -0700, Fernando Roberto
wrote:

> Hi all,
>
> I have a list of UNICODE_STRINGs and I’m using
> RtlXxxUnicodeString to perform operations with elements from it.
> However, I need to synchronize that list and I can’t use a SPIN_LOCKs
> because my threads will be running at DISPATCH_LEVEL when it is acquired
> and thus can’t call RtlXxxUnicodeString routines because callers from
> them must be in PASSIVE_LEVEL.
> Well, I’m thinking use MUTEX objects to synchronize my list, but
> what risk I have related to SMP subjects?
>
> Thanks in advance,
> Fernando Roberto da Silva.
>


Using Opera’s revolutionary e-mail client: http://www.opera.com/mail/

ERESOURCE should work well for the PASSIVE_LEVEL.

-----Original Message-----
From: Soumik Sarkar [mailto:xxxxx@yahoo.com]
Sent: Friday, September 09, 2005 6:47 PM
To: Windows System Software Devs Interest List
Subject: Re:[ntdev] Synchronization for UNICODE_STRING lists

Mutexes are SMP safe. Only one thread can own a mutex object no matter
which processor it is running on.

On Thu, 01 Sep 2005 11:04:40 -0700, Fernando Roberto
wrote:
>
>> Hi all,
>>
>> I have a list of UNICODE_STRINGs and I’m using
>> RtlXxxUnicodeString to perform operations with elements from it.
>> However, I need to synchronize that list and I can’t use a SPIN_LOCKs
>> because my threads will be running at DISPATCH_LEVEL when it is acquired
>> and thus can’t call RtlXxxUnicodeString routines because callers from
>> them must be in PASSIVE_LEVEL.
>> Well, I’m thinking use MUTEX objects to synchronize my list, but
>> what risk I have related to SMP subjects?
>>
>> Thanks in advance,
>> Fernando Roberto da Silva.
>>
>
>
>
>–
>Using Opera’s revolutionary e-mail client: http://www.opera.com/mail/
>
>—
>Questions? First check the Kernel Driver FAQ at
>http://www.osronline.com/article.cfm?id=256
>
>You are currently subscribed to ntdev as: xxxxx@emc.com
>To unsubscribe send a blank email to xxxxx@lists.osr.com