[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [win-pv-devel] [PATCH 7/9] Remove queue.h/.c



> -----Original Message-----
> From: win-pv-devel [mailto:win-pv-devel-bounces@xxxxxxxxxxxxxxxxxxxx] On
> Behalf Of Owen Smith
> Sent: 29 May 2018 11:07
> To: win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> Cc: Owen Smith <owen.smith@xxxxxxxxxx>
> Subject: [win-pv-devel] [PATCH 7/9] Remove queue.h/.c
> 
> XENVBD_QUEUE has been replaced by LIST_ENTRY, and is no longer used.
> Remove queue.h/.c and any include directives
> 
> Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>

Acked-by: Paul Durrant <paul.durrant@xxxxxxxxxx>

> ---
>  src/xenvbd/queue.c           | 139 
> -------------------------------------------
>  src/xenvbd/queue.h           |  86 --------------------------
>  src/xenvbd/target.c          |   1 -
>  vs2015/xenvbd/xenvbd.vcxproj |   1 -
>  vs2017/xenvbd/xenvbd.vcxproj |   1 -
>  5 files changed, 228 deletions(-)
>  delete mode 100644 src/xenvbd/queue.c
>  delete mode 100644 src/xenvbd/queue.h
> 
> diff --git a/src/xenvbd/queue.c b/src/xenvbd/queue.c
> deleted file mode 100644
> index fc70459..0000000
> --- a/src/xenvbd/queue.c
> +++ /dev/null
> @@ -1,139 +0,0 @@
> -/* Copyright (c) Citrix Systems Inc.
> - * All rights reserved.
> - *
> - * Redistribution and use in source and binary forms,
> - * with or without modification, are permitted provided
> - * that the following conditions are met:
> - *
> - * *   Redistributions of source code must retain the above
> - *     copyright notice, this list of conditions and the
> - *     following disclaimer.
> - * *   Redistributions in binary form must reproduce the above
> - *     copyright notice, this list of conditions and the
> - *     following disclaimer in the documentation and/or other
> - *     materials provided with the distribution.
> - *
> - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
> - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
> - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
> - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
> - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
> - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> - * SUCH DAMAGE.
> - */
> -
> -#include "queue.h"
> -#include "debug.h"
> -#include "assert.h"
> -
> -VOID
> -QueueInit(
> -    __in PXENVBD_QUEUE      Queue
> -    )
> -{
> -    RtlZeroMemory(Queue, sizeof(XENVBD_QUEUE));
> -    KeInitializeSpinLock(&Queue->Lock);
> -    InitializeListHead(&Queue->List);
> -}
> -
> -ULONG
> -QueueCount(
> -    __in PXENVBD_QUEUE      Queue
> -    )
> -{
> -    return Queue->Current;
> -}
> -
> -__checkReturn
> -PLIST_ENTRY
> -QueuePop(
> -    __in PXENVBD_QUEUE      Queue
> -    )
> -{
> -    KIRQL       Irql;
> -    PLIST_ENTRY Entry = NULL;
> -
> -    KeAcquireSpinLock(&Queue->Lock, &Irql);
> -
> -    if (!IsListEmpty(&Queue->List)) {
> -        Entry = RemoveHeadList(&Queue->List);
> -        ASSERT3P(Entry, !=, &Queue->List);
> -        --Queue->Current;
> -    }
> -
> -    KeReleaseSpinLock(&Queue->Lock, Irql);
> -
> -    return Entry;
> -}
> -
> -VOID
> -QueueUnPop(
> -    __in PXENVBD_QUEUE      Queue,
> -    __in PLIST_ENTRY        Entry
> -    )
> -{
> -    KIRQL               Irql;
> -
> -    KeAcquireSpinLock(&Queue->Lock, &Irql);
> -
> -    InsertHeadList(&Queue->List, Entry);
> -    if (++Queue->Current > Queue->Maximum)
> -        Queue->Maximum = Queue->Current;
> -
> -    KeReleaseSpinLock(&Queue->Lock, Irql);
> -}
> -
> -VOID
> -QueueAppend(
> -    __in PXENVBD_QUEUE      Queue,
> -    __in PLIST_ENTRY        Entry
> -    )
> -{
> -    KIRQL               Irql;
> -
> -    KeAcquireSpinLock(&Queue->Lock, &Irql);
> -
> -    InsertTailList(&Queue->List, Entry);
> -    if (++Queue->Current > Queue->Maximum)
> -        Queue->Maximum = Queue->Current;
> -
> -    KeReleaseSpinLock(&Queue->Lock, Irql);
> -}
> -
> -VOID
> -QueueRemove(
> -    __in PXENVBD_QUEUE      Queue,
> -    __in PLIST_ENTRY        Entry
> -    )
> -{
> -    KIRQL               Irql;
> -
> -    KeAcquireSpinLock(&Queue->Lock, &Irql);
> -
> -    RemoveEntryList(Entry);
> -    --Queue->Current;
> -
> -    KeReleaseSpinLock(&Queue->Lock, Irql);
> -}
> -
> -VOID
> -QueueDebugCallback(
> -    __in PXENVBD_QUEUE                  Queue,
> -    __in __nullterminated const CHAR*   Name,
> -    __in PXENBUS_DEBUG_INTERFACE        Debug
> -    )
> -{
> -    XENBUS_DEBUG(Printf, Debug,
> -                 "QUEUE: %s : %u / %u\n",
> -                 Name, Queue->Current, Queue->Maximum);
> -
> -    Queue->Maximum = Queue->Current;
> -}
> -
> diff --git a/src/xenvbd/queue.h b/src/xenvbd/queue.h
> deleted file mode 100644
> index 0434198..0000000
> --- a/src/xenvbd/queue.h
> +++ /dev/null
> @@ -1,86 +0,0 @@
> -/* Copyright (c) Citrix Systems Inc.
> - * All rights reserved.
> - *
> - * Redistribution and use in source and binary forms,
> - * with or without modification, are permitted provided
> - * that the following conditions are met:
> - *
> - * *   Redistributions of source code must retain the above
> - *     copyright notice, this list of conditions and the
> - *     following disclaimer.
> - * *   Redistributions in binary form must reproduce the above
> - *     copyright notice, this list of conditions and the
> - *     following disclaimer in the documentation and/or other
> - *     materials provided with the distribution.
> - *
> - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> - * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
> - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
> - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
> - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
> - * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
> - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
> - * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
> - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
> - * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
> - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
> - * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
> - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
> - * SUCH DAMAGE.
> - */
> -
> -#ifndef _XENVBD_QUEUE_H
> -#define _XENVBD_QUEUE_H
> -
> -#include <ntddk.h>
> -#include <debug_interface.h>
> -
> -typedef struct _XENVBD_QUEUE {
> -    KSPIN_LOCK          Lock;
> -    LIST_ENTRY          List;
> -    ULONG               Current;
> -    ULONG               Maximum;
> -} XENVBD_QUEUE, *PXENVBD_QUEUE;
> -
> -extern VOID
> -QueueInit(
> -    __in PXENVBD_QUEUE      Queue
> -    );
> -
> -extern ULONG
> -QueueCount(
> -    __in PXENVBD_QUEUE      Queue
> -    );
> -
> -__checkReturn
> -extern PLIST_ENTRY
> -QueuePop(
> -    __in PXENVBD_QUEUE      Queue
> -    );
> -
> -extern VOID
> -QueueUnPop(
> -    __in PXENVBD_QUEUE      Queue,
> -    __in PLIST_ENTRY        Entry
> -    );
> -
> -extern VOID
> -QueueAppend(
> -    __in PXENVBD_QUEUE      Queue,
> -    __in PLIST_ENTRY        Entry
> -    );
> -
> -extern VOID
> -QueueRemove(
> -    __in PXENVBD_QUEUE      Queue,
> -    __in PLIST_ENTRY        Entry
> -    );
> -
> -extern VOID
> -QueueDebugCallback(
> -    __in PXENVBD_QUEUE                  Queue,
> -    __in __nullterminated const CHAR*   Name,
> -    __in PXENBUS_DEBUG_INTERFACE        Debug
> -    );
> -
> -#endif // _XENVBD_QUEUE_H
> diff --git a/src/xenvbd/target.c b/src/xenvbd/target.c
> index 54ffb93..176cbbe 100644
> --- a/src/xenvbd/target.c
> +++ b/src/xenvbd/target.c
> @@ -46,7 +46,6 @@
>  #include "driver.h"
>  #include "adapter.h"
>  #include "frontend.h"
> -#include "queue.h"
>  #include "srbext.h"
> 
>  #include "debug.h"
> diff --git a/vs2015/xenvbd/xenvbd.vcxproj b/vs2015/xenvbd/xenvbd.vcxproj
> index a85e65b..752a021 100644
> --- a/vs2015/xenvbd/xenvbd.vcxproj
> +++ b/vs2015/xenvbd/xenvbd.vcxproj
> @@ -70,7 +70,6 @@
>      <ClCompile Include="../../src/xenvbd/frontend.c" />
>      <ClCompile Include="../../src/xenvbd/target.c" />
>      <ClCompile Include="../../src/xenvbd/base64.c" />
> -    <ClCompile Include="../../src/xenvbd/queue.c" />
>      <ClCompile Include="../../src/xenvbd/thread.c" />
>      <ClCompile Include="../../src/xenvbd/ring.c" />
>      <ClCompile Include="../../src/xenvbd/granter.c" />
> diff --git a/vs2017/xenvbd/xenvbd.vcxproj b/vs2017/xenvbd/xenvbd.vcxproj
> index 74af5fc..7b83222 100644
> --- a/vs2017/xenvbd/xenvbd.vcxproj
> +++ b/vs2017/xenvbd/xenvbd.vcxproj
> @@ -78,7 +78,6 @@
>      <ClCompile Include="../../src/xenvbd/frontend.c" />
>      <ClCompile Include="../../src/xenvbd/target.c" />
>      <ClCompile Include="../../src/xenvbd/base64.c" />
> -    <ClCompile Include="../../src/xenvbd/queue.c" />
>      <ClCompile Include="../../src/xenvbd/thread.c" />
>      <ClCompile Include="../../src/xenvbd/ring.c" />
>      <ClCompile Include="../../src/xenvbd/granter.c" />
> --
> 2.16.2.windows.1
> 
> 
> _______________________________________________
> win-pv-devel mailing list
> win-pv-devel@xxxxxxxxxxxxxxxxxxxx
> https://lists.xenproject.org/mailman/listinfo/win-pv-devel
_______________________________________________
win-pv-devel mailing list
win-pv-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/win-pv-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.