qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy
@ 2011-03-13 18:00 Stefan Weil
  2011-03-18 22:39 ` [Qemu-devel] " Stefan Weil
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2011-03-13 18:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: Blue Swirl, Paolo Bonzini

These functions were missing in commit
9257d46d55f1fe4e8209be9a6870e339ac3266fe.

Both functions are needed for compilations with
configuration --enable-vnc-thread.

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 qemu-thread-win32.c |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c
index 2edcb1a..2d2d5ab 100644
--- a/qemu-thread-win32.c
+++ b/qemu-thread-win32.c
@@ -33,6 +33,12 @@ void qemu_mutex_init(QemuMutex *mutex)
     InitializeCriticalSection(&mutex->lock);
 }
 
+void qemu_mutex_destroy(QemuMutex *mutex)
+{
+    assert(mutex->owner == 0);
+    DeleteCriticalSection(&mutex->lock);
+}
+
 void qemu_mutex_lock(QemuMutex *mutex)
 {
     EnterCriticalSection(&mutex->lock);
@@ -80,6 +86,21 @@ void qemu_cond_init(QemuCond *cond)
     }
 }
 
+void qemu_cond_destroy(QemuCond *cond)
+{
+    BOOL result;
+    result = CloseHandle(cond->continue_event);
+    if (!result) {
+        error_exit(GetLastError(), __func__);
+    }
+    cond->continue_event = 0;
+    result = CloseHandle(cond->sema);
+    if (!result) {
+        error_exit(GetLastError(), __func__);
+    }
+    cond->sema = 0;
+}
+
 void qemu_cond_signal(QemuCond *cond)
 {
     DWORD result;
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH] w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy
  2011-03-13 18:00 [Qemu-devel] [PATCH] w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy Stefan Weil
@ 2011-03-18 22:39 ` Stefan Weil
  2011-03-19  8:38   ` Blue Swirl
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Weil @ 2011-03-18 22:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Blue Swirl, qemu-devel

Am 13.03.2011 19:00, schrieb Stefan Weil:
> These functions were missing in commit
> 9257d46d55f1fe4e8209be9a6870e339ac3266fe.
>
> Both functions are needed for compilations with
> configuration --enable-vnc-thread.
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Blue Swirl <blauwirbel@gmail.com>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> qemu-thread-win32.c | 21 +++++++++++++++++++++
> 1 files changed, 21 insertions(+), 0 deletions(-)
>
> diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c
> index 2edcb1a..2d2d5ab 100644
> --- a/qemu-thread-win32.c
> +++ b/qemu-thread-win32.c
> @@ -33,6 +33,12 @@ void qemu_mutex_init(QemuMutex *mutex)
> InitializeCriticalSection(&mutex->lock);
> }
>
> +void qemu_mutex_destroy(QemuMutex *mutex)
> +{
> + assert(mutex->owner == 0);
> + DeleteCriticalSection(&mutex->lock);
> +}
> +
> void qemu_mutex_lock(QemuMutex *mutex)
> {
> EnterCriticalSection(&mutex->lock);
> @@ -80,6 +86,21 @@ void qemu_cond_init(QemuCond *cond)
> }
> }
>
> +void qemu_cond_destroy(QemuCond *cond)
> +{
> + BOOL result;
> + result = CloseHandle(cond->continue_event);
> + if (!result) {
> + error_exit(GetLastError(), __func__);
> + }
> + cond->continue_event = 0;
> + result = CloseHandle(cond->sema);
> + if (!result) {
> + error_exit(GetLastError(), __func__);
> + }
> + cond->sema = 0;
> +}
> +
> void qemu_cond_signal(QemuCond *cond)
> {
> DWORD result;

No comments? Why is is so difficult to get compilation problems fixed?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: [PATCH] w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy
  2011-03-18 22:39 ` [Qemu-devel] " Stefan Weil
@ 2011-03-19  8:38   ` Blue Swirl
  0 siblings, 0 replies; 3+ messages in thread
From: Blue Swirl @ 2011-03-19  8:38 UTC (permalink / raw)
  To: Stefan Weil; +Cc: Paolo Bonzini, qemu-devel

Thanks, applied.

On Sat, Mar 19, 2011 at 12:39 AM, Stefan Weil <weil@mail.berlios.de> wrote:
> Am 13.03.2011 19:00, schrieb Stefan Weil:
>>
>> These functions were missing in commit
>> 9257d46d55f1fe4e8209be9a6870e339ac3266fe.
>>
>> Both functions are needed for compilations with
>> configuration --enable-vnc-thread.
>>
>> Cc: Paolo Bonzini <pbonzini@redhat.com>
>> Cc: Blue Swirl <blauwirbel@gmail.com>
>> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
>> ---
>> qemu-thread-win32.c | 21 +++++++++++++++++++++
>> 1 files changed, 21 insertions(+), 0 deletions(-)
>>
>> diff --git a/qemu-thread-win32.c b/qemu-thread-win32.c
>> index 2edcb1a..2d2d5ab 100644
>> --- a/qemu-thread-win32.c
>> +++ b/qemu-thread-win32.c
>> @@ -33,6 +33,12 @@ void qemu_mutex_init(QemuMutex *mutex)
>> InitializeCriticalSection(&mutex->lock);
>> }
>>
>> +void qemu_mutex_destroy(QemuMutex *mutex)
>> +{
>> + assert(mutex->owner == 0);
>> + DeleteCriticalSection(&mutex->lock);
>> +}
>> +
>> void qemu_mutex_lock(QemuMutex *mutex)
>> {
>> EnterCriticalSection(&mutex->lock);
>> @@ -80,6 +86,21 @@ void qemu_cond_init(QemuCond *cond)
>> }
>> }
>>
>> +void qemu_cond_destroy(QemuCond *cond)
>> +{
>> + BOOL result;
>> + result = CloseHandle(cond->continue_event);
>> + if (!result) {
>> + error_exit(GetLastError(), __func__);
>> + }
>> + cond->continue_event = 0;
>> + result = CloseHandle(cond->sema);
>> + if (!result) {
>> + error_exit(GetLastError(), __func__);
>> + }
>> + cond->sema = 0;
>> +}
>> +
>> void qemu_cond_signal(QemuCond *cond)
>> {
>> DWORD result;
>
> No comments? Why is is so difficult to get compilation problems fixed?
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-19  8:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-13 18:00 [Qemu-devel] [PATCH] w32: Add missing functions qemu_mutex_destroy, qemu_cond_destroy Stefan Weil
2011-03-18 22:39 ` [Qemu-devel] " Stefan Weil
2011-03-19  8:38   ` Blue Swirl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).