Could i use two or more cancel- safe-queues with different LIST_ENTRY
declare
and SPIN_LOCK, but share the callback functions?
ex:
LIST_ENTRY for read irp / LIST_ENTRY for write /LIST_ENTRY for device io
control .... share the same call back function"csqInsertIRP".


poly

Re: Could i use two or more cancel- safe-queues ? by Doron

Doron
Tue Aug 02 02:31:50 CDT 2005

yes, if you use implement the callbacks to use the LIST_ENTRY list head as
it w/out assuming which one of the 3 it is.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"poly" <poly@no-span.com> wrote in message
news:OjfHYKzlFHA.1044@tk2msftngp13.phx.gbl...
> Could i use two or more cancel- safe-queues with different LIST_ENTRY
> declare
> and SPIN_LOCK, but share the callback functions?
> ex:
> LIST_ENTRY for read irp / LIST_ENTRY for write /LIST_ENTRY for device
> io control .... share the same call back function"csqInsertIRP".
>
>
> poly
>
>



Re: Could i use two or more cancel- safe-queues ? by poly

poly
Tue Aug 02 03:03:15 CDT 2005

Dear Doron Holan
Are you telling me that
It is no way to identify difference LIST_ENTRY in "csqInsertIRP" ?

poly

"Doron Holan [MS]" <doronh@nospam.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:OVNqARzlFHA.2484@TK2MSFTNGP15.phx.gbl...
> yes, if you use implement the callbacks to use the LIST_ENTRY list head as
> it w/out assuming which one of the 3 it is.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "poly" <poly@no-span.com> wrote in message
> news:OjfHYKzlFHA.1044@tk2msftngp13.phx.gbl...
>> Could i use two or more cancel- safe-queues with different LIST_ENTRY
>> declare
>> and SPIN_LOCK, but share the callback functions?
>> ex:
>> LIST_ENTRY for read irp / LIST_ENTRY for write /LIST_ENTRY for device
>> io control .... share the same call back function"csqInsertIRP".
>>
>>
>> poly
>>
>>
>
>



Re: Could i use two or more cancel- safe-queues ? by poly

poly
Tue Aug 02 06:18:53 CDT 2005

Sorry, I don't really understand what you said.

"poly" <poly@no-span.com> ¼¶¼g©ó¶l¥ó·s»D:%23uOzqdzlFHA.3936@TK2MSFTNGP10.phx.gbl...
> Dear Doron Holan
> Are you telling me that
> It is no way to identify difference LIST_ENTRY in "csqInsertIRP" ?
>
> poly
>
> "Doron Holan [MS]" <doronh@nospam.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:OVNqARzlFHA.2484@TK2MSFTNGP15.phx.gbl...
>> yes, if you use implement the callbacks to use the LIST_ENTRY list head
>> as it w/out assuming which one of the 3 it is.
>>
>> d
>>
>> --
>> Please do not send e-mail directly to this alias. this alias is for
>> newsgroup purposes only.
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>>
>>
>> "poly" <poly@no-span.com> wrote in message
>> news:OjfHYKzlFHA.1044@tk2msftngp13.phx.gbl...
>>> Could i use two or more cancel- safe-queues with different LIST_ENTRY
>>> declare
>>> and SPIN_LOCK, but share the callback functions?
>>> ex:
>>> LIST_ENTRY for read irp / LIST_ENTRY for write /LIST_ENTRY for device
>>> io control .... share the same call back function"csqInsertIRP".
>>>
>>>
>>> poly
>>>
>>>
>>
>>
>
>



Re: Could i use two or more cancel- safe-queues ? by Doron

Doron
Wed Aug 03 01:46:40 CDT 2005

what you need to do is something like this

typedef struct _MY_CSQ {
IO_CSQ IoCsq;
KSPIN_LOCK Lock;
LIST_ENTRY ListHead;
} MY_CSQ, *PMY_CSQ;

and then as an example for CsqAcquireLock you would do this

VOID
CsqAcquireLock(
PIO_CSQ Csq,
PKIRQL Irql
)
{
PMY_CSQ pMyCsq;

pMyCsq = CONTAINING_RECORD(Csq, MY_CSQ, IoCsq);
KeAcquireSpinLock(&pMyCsq->Lock, Irql);
}

the remaining functions would follow the same form, you use
CONTAINING_RECORD to get at MY_CSQ and MY_CSQ contains all of the fields you
need to implement a CSQ.

d

--
Please do not send e-mail directly to this alias. this alias is for
newsgroup purposes only.
This posting is provided "AS IS" with no warranties, and confers no rights.


"poly" <poly@no-span.com> wrote in message
news:eQ2e%23K1lFHA.3544@TK2MSFTNGP15.phx.gbl...
> Sorry, I don't really understand what you said.
>
> "poly" <poly@no-span.com>
> ¼¶¼g©ó¶l¥ó·s»D:%23uOzqdzlFHA.3936@TK2MSFTNGP10.phx.gbl...
>> Dear Doron Holan
>> Are you telling me that
>> It is no way to identify difference LIST_ENTRY in "csqInsertIRP" ?
>>
>> poly
>>
>> "Doron Holan [MS]" <doronh@nospam.microsoft.com>
>> ¼¶¼g©ó¶l¥ó·s»D:OVNqARzlFHA.2484@TK2MSFTNGP15.phx.gbl...
>>> yes, if you use implement the callbacks to use the LIST_ENTRY list head
>>> as it w/out assuming which one of the 3 it is.
>>>
>>> d
>>>
>>> --
>>> Please do not send e-mail directly to this alias. this alias is for
>>> newsgroup purposes only.
>>> This posting is provided "AS IS" with no warranties, and confers no
>>> rights.
>>>
>>>
>>> "poly" <poly@no-span.com> wrote in message
>>> news:OjfHYKzlFHA.1044@tk2msftngp13.phx.gbl...
>>>> Could i use two or more cancel- safe-queues with different LIST_ENTRY
>>>> declare
>>>> and SPIN_LOCK, but share the callback functions?
>>>> ex:
>>>> LIST_ENTRY for read irp / LIST_ENTRY for write /LIST_ENTRY for
>>>> device io control .... share the same call back function"csqInsertIRP".
>>>>
>>>>
>>>> poly
>>>>
>>>>
>>>
>>>
>>
>>
>
>



Re: Could i use two or more cancel- safe-queues ? by poly

poly
Wed Aug 03 04:14:25 CDT 2005

Dear Doron Holan

Thank you so much!!
That is great.

poly

"Doron Holan [MS]" <doronh@nospam.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:e2rXbc$lFHA.320@TK2MSFTNGP09.phx.gbl...
> what you need to do is something like this
>
> typedef struct _MY_CSQ {
> IO_CSQ IoCsq;
> KSPIN_LOCK Lock;
> LIST_ENTRY ListHead;
> } MY_CSQ, *PMY_CSQ;
>
> and then as an example for CsqAcquireLock you would do this
>
> VOID
> CsqAcquireLock(
> PIO_CSQ Csq,
> PKIRQL Irql
> )
> {
> PMY_CSQ pMyCsq;
>
> pMyCsq = CONTAINING_RECORD(Csq, MY_CSQ, IoCsq);
> KeAcquireSpinLock(&pMyCsq->Lock, Irql);
> }
>
> the remaining functions would follow the same form, you use
> CONTAINING_RECORD to get at MY_CSQ and MY_CSQ contains all of the fields
> you need to implement a CSQ.
>
> d
>
> --
> Please do not send e-mail directly to this alias. this alias is for
> newsgroup purposes only.
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "poly" <poly@no-span.com> wrote in message
> news:eQ2e%23K1lFHA.3544@TK2MSFTNGP15.phx.gbl...
>> Sorry, I don't really understand what you said.
>>
>> "poly" <poly@no-span.com> ¼¶¼g©ó¶l¥ó·s»D:%23uOzqdzlFHA.3936@TK2MSFTNGP10.phx.gbl...
>>> Dear Doron Holan
>>> Are you telling me that
>>> It is no way to identify difference LIST_ENTRY in "csqInsertIRP" ?
>>>
>>> poly
>>>
>>> "Doron Holan [MS]" <doronh@nospam.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:OVNqARzlFHA.2484@TK2MSFTNGP15.phx.gbl...
>>>> yes, if you use implement the callbacks to use the LIST_ENTRY list head
>>>> as it w/out assuming which one of the 3 it is.
>>>>
>>>> d
>>>>
>>>> --
>>>> Please do not send e-mail directly to this alias. this alias is for
>>>> newsgroup purposes only.
>>>> This posting is provided "AS IS" with no warranties, and confers no
>>>> rights.
>>>>
>>>>
>>>> "poly" <poly@no-span.com> wrote in message
>>>> news:OjfHYKzlFHA.1044@tk2msftngp13.phx.gbl...
>>>>> Could i use two or more cancel- safe-queues with different LIST_ENTRY
>>>>> declare
>>>>> and SPIN_LOCK, but share the callback functions?
>>>>> ex:
>>>>> LIST_ENTRY for read irp / LIST_ENTRY for write /LIST_ENTRY for
>>>>> device io control .... share the same call back
>>>>> function"csqInsertIRP".
>>>>>
>>>>>
>>>>> poly
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>