From: Paolo Bonzini <pbonzini@redhat.com>
To: Pavel Dovgaluk <Pavel.Dovgaluk@ispras.ru>
Cc: Stefan Weil <sw@weilnetz.de>, 'qemu-devel' <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH] Added cleanup for Win32 TAP interface
Date: Mon, 15 Apr 2013 17:55:55 +0200 [thread overview]
Message-ID: <516C230B.8090608@redhat.com> (raw)
In-Reply-To: <12545.9562209018$1363177481@news.gmane.org>
Il 13/03/2013 13:23, Pavel Dovgaluk ha scritto:
> Added cleanup for Win32 TAP interface.
>
> Signed-off-by: Pavel Dovgalyuk<pavel.dovgaluk@gmail.com>
Stefan, did this slip?
Paolo
> ---
> net/tap-win32.c | 8 ++++----
> 1 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/tap-win32.c b/net/tap-win32.c
> index 91e9e84..1c1176c 100644
> --- a/net/tap-win32.c
> +++ b/net/tap-win32.c
> @@ -99,6 +99,7 @@ typedef struct tap_win32_overlapped {
> HANDLE output_queue_semaphore;
> HANDLE free_list_semaphore;
> HANDLE tap_semaphore;
> + HANDLE hThread;
> CRITICAL_SECTION output_queue_cs;
> CRITICAL_SECTION free_list_cs;
> OVERLAPPED read_overlapped;
> @@ -625,7 +626,7 @@ static int tap_win32_open(tap_win32_overlapped_t **phandle,
>
> *phandle = &tap_overlapped;
>
> - CreateThread(NULL, 0, tap_win32_thread_entry,
> + tap_overlapped.hThread = CreateThread(NULL, 0, tap_win32_thread_entry,
> (LPVOID)&tap_overlapped, 0, &idThread);
> return 0;
> }
> @@ -643,9 +644,8 @@ static void tap_cleanup(NetClientState *nc)
>
> qemu_del_wait_object(s->handle->tap_semaphore, NULL, NULL);
>
> - /* FIXME: need to kill thread and close file handle:
> - tap_win32_close(s);
> - */
> + TerminateThread(s->handle->hThread, 0);
> + CloseHandle(s->handle->handle);
> }
>
> static ssize_t tap_receive(NetClientState *nc, const uint8_t *buf, size_t size)
>
>
>
>
next parent reply other threads:[~2013-04-15 15:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <12545.9562209018$1363177481@news.gmane.org>
2013-04-15 15:55 ` Paolo Bonzini [this message]
2013-04-15 18:32 ` [Qemu-devel] [PATCH] Added cleanup for Win32 TAP interface Stefan Weil
2013-04-16 7:43 ` Pavel Dovgaluk
2013-04-16 7:47 ` Stefan Hajnoczi
[not found] <51407009.05c6e00a.355c.5275SMTPIN_ADDED_BROKEN@mx.google.com>
2013-03-13 12:55 ` Stefan Hajnoczi
2013-03-13 12:23 Pavel Dovgaluk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=516C230B.8090608@redhat.com \
--to=pbonzini@redhat.com \
--cc=Pavel.Dovgaluk@ispras.ru \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.